Okay, here's the latest
By changing my click method from models.click() to models.click(new Location()) I can expand the drop down finally.
Now my code can get the list of items using your code: IList<Ranorex.ListItem> optionList = Host.Local.Find<Ranorex.ListItem>("/container[@caption='selectbox']/listitem");
So far so good.
However after the first iteration in the loop, it no longer selects the items in the drop down. Rather it goes to the browser tool bar and does a right click and opens the browser menu.
foreach(ListItem listItem in optionList)
{
//Open combobox
models.Click(new Location());
//Click list item
listItem.Click();
}
I suspect the problem is that when an item is selected in the drop down, the page does postback and the references get lost.
Any suggestions?
Thanks