There is a page loaded in a webBrowser1 object. It has a "button" tag, which is the button that I need to click. It's basic button. No JavaScript, etc.
I tried:
1) to click it with "enter":
webBrowser.Document.GetElementsByTagName("button")[0].Focus();
Sendkeys.Sendwait("{ENTER}");
That didn't work.
2) to call the "click" event:
webBrowser.Document.GetElementsByTagName("button")[0].InvokeMember("click");
That also didn't work because it's not JavaScript.
3) the "click" handler:
webBrowser.Document.GetElementsByTagName("button")[0].Click +=
new System.EventHandler(button_click1);
This also can not work, because from what I've read, this is an event handler which triggers after the user actually clicks on this button.
So I ran out of options. What else can I try?