Select Static Text Element from Combo Box : Automation API

Select Static Text Element from Combo Box

Class library usage, coding and language questions.

Select Static Text Element from Combo Box

Postby mvn » Mon Sep 15, 2008 3:22 pm

Hi,
How can I select a static text element from a combo box that contains a
long list of static text elements. I can select those that are shown when the combo box drop down list is displayed but not those that are hidden?
I want to avoid multiple clicks on the combo box push button as the list can change, would prefer if there was some logical method to select the actual text. Class name is WindowsForms10.COMBOBOX.app

Thanks,
mvn
 
Posts: 9
Joined: Wed Feb 13, 2008 12:17 pm

Postby Support Team » Mon Sep 15, 2008 5:09 pm

Setting the "SelectedText" or "SelectedIndex" properties on the Ranorex ComboBox object should work, e.g.

ComboBox myCombo = <.. find by class name or control name ..>

myCombo.SelectedIndex = 0;
or
myCombo.SelectedText = "ListEntry42";


Michael
Ranorex Team
User avatar
Support Team
Site Admin
 
Posts: 4845
Joined: Fri Jul 07, 2006 5:30 pm
Location: Graz, Austria


Return to Automation API

Who is online

Users browsing this forum: No registered users and 0 guests

cron