Im working in a project for automating tests for an application made in Delphi. (version unknow)
With the Ranorex spy i can get the classname of the desired combo (TDBLookupComboBox) and also got the name of the list class (TPopupDataList).
How can i get the selected text ?
I'm using Ranorex 1.5 and VB.Net.
How to get a combobox item ? Delphi form
-
- Posts: 6
- Joined: Fri Nov 07, 2008 12:11 pm
- Support Team
- Site Admin
- Posts: 12145
- Joined: Fri Jul 07, 2006 4:30 pm
- Location: Houston, Texas, USA
- Contact:
Normally, you can read the selected text of the combo as follows:How can i get the selected text ?
(The selected text is the value of the combo element.)
Code: Select all
ComboBox comboBox = form.FindComboBox("comboBox1");
Element comboElement = comboBox.Element.FindChild(Role.ComboBox);
String comboValue = comboElement.Value;
Console.WriteLine("Combo value= {0}", comboValue);
Ranorex Team
-
- Posts: 6
- Joined: Fri Nov 07, 2008 12:11 pm
the problem is name
the problem is that i can't get the combobox name...
- Support Team
- Site Admin
- Posts: 12145
- Joined: Fri Jul 07, 2006 4:30 pm
- Location: Houston, Texas, USA
- Contact:
OK, you can also find the combo by class name:the problem is that i can't get the combobox name...
Code: Select all
ComboBox comboBox = (ComboBox)form.FindClassName("TDBLookupComboBox");
Element comboElement = comboBox.Element.FindChild(Role.ComboBox);
String comboValue = comboElement.Value;
Console.WriteLine("Combo value= {0}", comboValue);
Jenö
Ranorex Team