mohammed qadoora mohammed qadoora - 6 months ago 35
C# Question

select combobox item in website using c#

I need to select a combo box item in a website using c#

i open a website using a web browser

my code is

HtmlElementCollection Col2;
Col2 = webBrowser1.Document.GetElementsByTagName("select");
foreach (HtmlElement ele in Col2)
if (ele.Id == "country")

where is Palestine is one of the items in the combo box.
any help please

webBrowser1.Document.GetElementsByTagName("select").SetAttribute("value", "palestine");