Page 1 of 1

Delphi Combobox List Item Select

Posted: Thu Jan 30, 2020 5:43 pm
by oli129
Hello everyone!

I do have an app written in delphi I have to automate tests on. I am unsure on the delphi version, however I do have a TRxDBLookup Combo Class and a controlname.

I do have to click on this list and select an item given in the test case. However, ranorex is unable to discover the items, so unless I start typing in the box itself, there is no sign of the items when I have ranorex click on the combo box.
jutalek001 (2).jpg
I attached the snapshot, the item in question is 'edNev', this is supposed to be a combo box, which drops down a list of items on click. The items are pulled from a database.


The 'edNev' is the controlname of the element and its class is TRxDBLookupCombo.

Code: Select all

/form[@controlname='FelhasznJutalekForm']/element[@controlname='edNev']
Could you please help me how I could access its list items to tell Ranorex to click on?

I also have found a forum topic on such delphi case, however I am unable to properly comprehend the code in there:
https://www.ranorex.com/forum/how-to-ge ... -t512.html

Thank you very much for your help! I would greaty appreciate any advice or suggestion.

Re: Delphi Combobox List Item Select

Posted: Fri Jan 31, 2020 8:38 am
by odklizec
Hi,

It seems that your app is built with unsupported Delphi version...
DelphiVersion.png
Which means that your options are pretty limited.

At first, you can try to disable native Delphi plugin in Ranorex settings (both in Standalone spy and Studio).
Delphi_Plugin.png
Then try to check if the combo box elements are still not recognizable. In some cases, disabling Delphi plugin can really help with unsupported Delphi versions and custom controls. Of course, the level of details returned by Ranorex could be lower, than with the native Delphi plugin. But I think that in your case, something is better than nothing? ;)

Another possibility is to try the GDI Capture approach described in user guide:
https://www.ranorex.com/help/latest/ran ... e-feature/
Sadly, even with this option, you may not be able to obtain individual elements and the usability or RAWTexts is somewhat limited. But once again, it may be better than nothing?

Last option could be writing the item you are looking for in the Search input and then instead of clicking in combo box, just send "Enter" or "Space" shortcut?

Also, just in case, try to update Ranorex with most recent 9.2.1. There is nothing Delphi-related mentioned in the release notes, but you know, one newer knows? :)

Re: Delphi Combobox List Item Select

Posted: Mon Feb 03, 2020 2:48 pm
by oli129
Hi,

thank you very much for the valuable input! I do really appreciate it!

I did try to turn off the delhi plug-in, however that did not help.

So, what I ended up doing is typing string into the delphi field using the keypress method, then did a for loop to select and validate the item in the drop down list. Obivously, it is not quite dynamic, since the list can be extended with extra items.

However, for now, it is fine.