简体   繁体   中英

How to click on a input button in a non static page (webbrowser c#)?

I'm trying to click on a input button on a page in my webbrowser form, but InvokeMember event is not working, I researched, and read that the InvokeMember only works on static page, but the page, that I'm trying to automate the click, is not static , I do not find a way to click the input of a non-static page.

Does anyone have any idea how to solve this problem?

I've tried:

webBrowser1.Document.GetElementById("loginBtn").InvokeMember("Click");
webBrowser1.Document.GetElementById("loginBtn").RaiseEvent("onclick");

Tanks for the help, I found the answer The page was anti-robot and does not allow a very quick click, then placing a

 Thread.sleep (1000);

tricked the the page and allowed the automation login.

我正在为Web应用程序登录页面上工作,并且我在我的button.onclick函数中使用validate()方法。

<input type="button" id="commit" value="Sign in" onclick=" validate() ">`

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM