That should work for sure. I tested it on Anchors and DIvs that contain an onclick event.
HtmlElementCollection inputColl = HTMLDoc.GetElementsByTagName("input"); foreach (HtmlElement inputTag in inputColl) { string valueAttribute = inputTag.GetAttribute("value"); if (valueAttribute.ToLower() == "sign up") { obj = inputTag.DomElement; mi = obj.GetType().GetMethod("click"); mi.Invoke(obj, new object[0]); } }
I was not able to open the link to see the code, so I did not try this on your specific case. In any case, if this does not work, can the TAG container be inserted into the form, in this case you need to fire the form submission event, and not click on the sorm submit button.
In any case, can your code work if you name "click" as a lowercase (I really didn’t check, I just wondered if the nut was in C #!).
PS: see Webbrowser: a sequence of actions when no DocumentCompleted is launched by a link on a hosted web page for some interesting side code for you, hope this helps and maybe someone helps me get back!
source share