I have a dropdown in my webapp with a number items listed.
<ul id="ShowOptions" >
<li id="ShowOption1">Item1</li>
<li id="ShowOption2">Item2</li>
<li id="ShowOption3">Item3</li>
<li id="ShowOption4">Item4</li>
</ul>
I want to iterate through each of the items, select one and then press a button on my page after each selection.
The code I have so far grabs each element in the list but i'm not sure where to go from there.
HtmlUnorderedList showoptions = ActiveBrowser.Find.ById<HtmlUnorderedList>("Show Options");
foreach(HtmlListItem item in showoptions.AllItems)
{
//Do stuff
}
<ul id="ShowOptions" >
<li id="ShowOption1">Item1</li>
<li id="ShowOption2">Item2</li>
<li id="ShowOption3">Item3</li>
<li id="ShowOption4">Item4</li>
</ul>
I want to iterate through each of the items, select one and then press a button on my page after each selection.
The code I have so far grabs each element in the list but i'm not sure where to go from there.
HtmlUnorderedList showoptions = ActiveBrowser.Find.ById<HtmlUnorderedList>("Show Options");
foreach(HtmlListItem item in showoptions.AllItems)
{
//Do stuff
}