I am using Dotnet Web Browser to click an Input Element - Button. When this click event is fired, it performs a JS function, which generates captcha using Google Recaptcher, source of which looks like Recaptcha link. Now the issue is that I am unable to fire the onClick event, I am using the following code:
HtmlElementCollection inputColl = HTMLDoc.GetElementsByTagName("input");
foreach (HtmlElement inputTag in inputColl)
{
string valueAttribute = inputTag.GetAttribute("value");
if (valueAttribute.ToLower() == "sign up")
{
inputTag.Focus();
inputTag.InvokeMember("Click");
break;
}
}
I have checked everything, I am catching the right button, but don't know why the onClick event is not getting fired. Any suggestion is welcome.