windev objects

Ask general questions here.
yfrindel
Posts: 11
Joined: Mon Mar 02, 2015 11:50 am

Re: windev objects

Post by yfrindel » Thu Apr 23, 2015 11:06 am

Thx for the tips, but this is unfortunatly not a solution.
When i try this "/form[@title='Ranorex test']?/?/listitem[@index='1']" Ranorex select element2, but when i add an element (element0 for example) at the top of the list, Ranorex select element1.
I need to use something like this : /form[@title='Ranorex test']/?/?/listitem[@text='element2'] but this is not correct.
Do u have any idea please ?

User avatar
Support Team
Site Admin
Site Admin
Posts: 12145
Joined: Fri Jul 07, 2006 4:30 pm
Location: Houston, Texas, USA
Contact:

Re: windev objects

Post by Support Team » Fri Apr 24, 2015 11:47 am

Hello yfrindel,

Well, if the index of your list elements changes you will need to find some attributes in order to identify your elements uniquely. Afterwards, they can be selected independently from their actual position within the list.

Regards,
Robert

yfrindel
Posts: 11
Joined: Mon Mar 02, 2015 11:50 am

Re: windev objects

Post by yfrindel » Fri Apr 24, 2015 1:13 pm

hi,

Indeed i try to find the element by the text, but i don't find the text anywhere, except in the rawtext. How can i link the element and his rawtext ?

thx

User avatar
odklizec
Ranorex Guru
Ranorex Guru
Posts: 7470
Joined: Mon Aug 13, 2012 9:54 am
Location: Zilina, Slovakia

Re: windev objects

Post by odklizec » Fri Apr 24, 2015 2:14 pm

What you can try is to get the RawText Row attribute, store it in variable and then use this variable in ListItem Index attribute. Like this...
ListBox_RawText.png
But I have no clue how reliable this solution might be with your "realworld" listbox? The order of ListItems may be different than order of RawTexts and so the above solution may not work.

And next problem, Ranorex seems does not return RawText for all windev list elements! For example, there is no Element4 rawtext returned from the example listbox you posted in your previous post. So the above solution may work with some elements, but most probably not all of them?
You do not have the required permissions to view the files attached to this post.
Pavel Kudrys
Ranorex explorer at Descartes Systems

Please add these details to your questions:
  • Ranorex Snapshot. Learn how to create one >here<
  • Ranorex xPath of problematic element(s)
  • Ranorex version
  • OS version
  • HW configuration

yfrindel
Posts: 11
Joined: Mon Mar 02, 2015 11:50 am

Re: windev objects

Post by yfrindel » Mon Apr 27, 2015 1:34 pm

Indeed, i have not the same number of rawtext as listitem. that's strange. :?
On my mind, ranorex don't work very well with windev.
But I 'm still pleasantly surprised by the efficiency of ranorex :D

User avatar
odklizec
Ranorex Guru
Ranorex Guru
Posts: 7470
Joined: Mon Aug 13, 2012 9:54 am
Location: Zilina, Slovakia

Re: windev objects

Post by odklizec » Mon Apr 27, 2015 1:54 pm

Hi,

You may still be able to increment/decrement the number obtained from RAWText via user code (before using the variable in Repository). Unfortunately, using RAWTexts (GDI approach in general) is always tricky and I would recommend to use it only in simple cases, like obtaining the button name. Element recognition via index numbers obtained from RAWText is always a bet ;)

As for the Ranorex reliability with windev controls, I can only speculate that the problem is caused by the windev's lack of proper accessibility implementation? If the windev cotrol is not designed with the accessibility in mind, there is not much Ranorex folks can do about it. I think Ranorex folks can provide you with more technical details.
Pavel Kudrys
Ranorex explorer at Descartes Systems

Please add these details to your questions:
  • Ranorex Snapshot. Learn how to create one >here<
  • Ranorex xPath of problematic element(s)
  • Ranorex version
  • OS version
  • HW configuration