I need to get a element by type in C# the HTML looks like this:
i have tried the following code, and was successfull.
HtmlElementCollection htmlcol = ((WebBrowser)sender).Document.GetElementsByTagName("input");
for (int i = 0; i < htmlcol.Count; i++)
{
if (htmlcol[i].GetAttribute("value") == "Search")
{
htmlcol[i].InvokeMember("click");
}
}
i have tried this code for the following condition
you can also try for such html tags and i am hopeful that it will work for you... enjoy