I using gecko browser and i need select a specific listbox or combobox but same page have in more than one listbox and combobox. I try the following method but it applies to all. And there is no id tag, just a name tag.
GeckoElementCollection ListeBoxKomboBox = Tarayıcı.Document.GetElementsByTagName("option");
foreach (GeckoHtmlElement Element in ListeBoxKomboBox)
{
if (Element.GetAttribute("value") == "1")
{
Element.SetAttribute("selected", "selected");
}
if (Element.GetAttribute("value") == "2")
{
Element.SetAttribute("selected", "selected");
}
}
I do not want you to pick the items with the same value in other boxes. Is this like solution available for gecko?