Page 1 of 1

Combo box Dropdown value selection issue

Posted: Tue Jan 27, 2015 2:36 pm
by deka
Hi,

I m trying to fetch values and select an item in a dropw donw list box with a checkbox inside it. Its a desktop applicaiton. Please see attachment for details.

I could be able to fetched the items from the combo list but couldnot able to do so to select an item(checkbox).

below code is used:

int t= repo.SLATESTAGE3ANewScreen.MultiSelUserDropDown.Items.Count;
string name="";

for (int i=0; i<t; i++ )
{
name=repo.SLATESTAGE3ANewScreen.MultiSelUserDropDown.Items.Text;
repo.SLATESTAGE3ANewScreen.MultiSelUserDropDown.Items.Select();
}
Any help will be appriciate.

Thanks.

deka

Re: Combo box Dropdown value selection issue

Posted: Tue Jan 27, 2015 5:26 pm
by Ciege
Does Ranorex identify the checkbox or just a ListItem?

Since Ranorex probably just identifies a ListItem you can click the ListItem at Location.CenterLeft, which *should* click the checkbox.

You could also code your own solution to check for the length of the LIstItem, determine the approximate number of pixels from list you checkbox lives, then click at that location.