Thanks planoie. Yeah, it would have been easier with Javascript, however, I have no control over the other website.
I have come up with a working solution below:
If there's a simpler one, i'd be happy to use it :)
HtmlDocument document = this.webBrowser1.Document;
HtmlElementCollection input = document.All.GetElementsByTagName("input");
foreach (HtmlElement element in input)
{
if (element.GetAttribute("type").ToLower() == "radio")
{
if (element.Name == "myradio" && element.GetAttribute("checked").ToLower() == "true")
color = element.Value;
}
}
|