Delphi Combobox List Item Select

Best practices, code snippets for common functionality, examples, and guidelines.
Posts: 7
Joined: Wed Nov 06, 2019 1:36 pm

Delphi Combobox List Item Select

Post by oli129 » Thu Jan 30, 2020 5:43 pm

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
jutalek001 (2).jpg (108.26 KiB) Viewed 837 times
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

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: ... -t512.html

Thank you very much for your help! I would greaty appreciate any advice or suggestion.
Last edited by oli129 on Mon Feb 03, 2020 2:49 pm, edited 1 time in total.

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

Re: Delphi Combobox List Item Select

Post by odklizec » Fri Jan 31, 2020 8:38 am


It seems that your app is built with unsupported Delphi version...
DelphiVersion.png (9.51 KiB) Viewed 830 times
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 (18.18 KiB) Viewed 830 times
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: ... 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? :)
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

Posts: 7
Joined: Wed Nov 06, 2019 1:36 pm

Re: Delphi Combobox List Item Select

Post by oli129 » Mon Feb 03, 2020 2:48 pm


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.