Selecting an Item from a Combobox
Posted: Mon May 03, 2010 8:44 pm
I am trying to select an item from a combobox as described in the help. The path for the combobox is correct and will be tracked by ranorex.
But with my code the list item won't be selected. The variable s_username has the correct value during runtime and the value exists in the list.
Any ideas?
But with my code the list item won't be selected. The variable s_username has the correct value during runtime and the value exists in the list.
Any ideas?
Code: Select all
Ranorex.ComboBox combobox = "/form[@controlname='mdiXCanWSAnalyzer']/element[@controltypename='MdiClient']/form/container/container[@controlname='panel1']/element[@controlname='ucboUserName']/combobox/combobox";
ListItem lst_userItem = combobox.FindSingle<ListItem>("list/listitem[@accessiblename='"+s_username+"']");
lst_userItem.Click();