VB.NET - Click Submit Button on Webbrowser page

前端 未结 8 854
时光说笑
时光说笑 2021-02-09 02:30

I have a html page open on my webbrowser object, I can enter username and password okay, but I\'m stuck and don\'t know how to submit the info. Here is the html code for the us

8条回答
  •  佛祖请我去吃肉
    2021-02-09 02:50

    Just follow two steps for clicking a any button using code.

    1. focus the button or element which you want to click

      WebBrowser1.Document.GetElementById("place id here").Focus()

    2. simulate mouse click using this following code

      SendKeys.Send("{ENTER}")

提交回复
热议问题