Record a desktop drop down (search and select)

Best practices, code snippets for common functionality, examples, and guidelines.
mmahra
Posts: 37
Joined: Wed Feb 26, 2020 2:17 pm

Record a desktop drop down (search and select)

Post by mmahra » Tue Mar 10, 2020 5:53 am

Hello,

I have drop down where I should search a country name and select it from the search result, unfortunately the record play is not working as it is supposed to.

When running from step 29 to 32 the record is successful but still not searching the country in the footer, and I am still not able to figure out how to click the searched item.
Snapshot attached.
Last edited by mmahra on Thu Mar 19, 2020 11:13 am, edited 1 time in total.

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

Re: Record a desktop drop down (search and select)

Post by odklizec » Tue Mar 10, 2020 8:49 am

Hi,

Well, if you need to select the country from the table, which shows the list of countries (/form[@name='none']//table[@class='TcxGridSite']) then you are in trouble. It seems that Ranorex cannot see "inside" the table (another pesky devexpress control) and so there is not really much you can do about this.

At first, you can try to add the table to the GDI capture list. Then, after refreshing the UI tree in Spy, it may (or may not) display the list of RAW texts, among which you should be able to see and click the searched country.

If there are are no rawtexts generated, then you are in trouble. The only other thing you might try is to sent "Enter", or "Space" shortcut to the table in question? I assume, that after searching the country via search input, the country is selected in table? So then it should be possible to invoke its action not just via mouse click, but also via shortcut. Just try which shortcut is working and then simply apply such shortcut via recording action. It may not be a perfect solution, but it's probably best what you can do with such table control.

And finally, I would suggest to contact Ranorex support, (via their support form) and send them your app, or at very least a demo app, containing the problematic table. With demo app, they can analyze the table control and eventually add support for such control. Or may be not? ;) But without seeing the control, there is definitely not much they can do about this.
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

mmahra
Posts: 37
Joined: Wed Feb 26, 2020 2:17 pm

Re: Record a desktop drop down (search and select)

Post by mmahra » Tue Mar 10, 2020 12:41 pm

Hello Pavel,

Thank you so much for the detailed info and suggestions,
after several and endless trials seems that set value is the only thing that works!