VB.NET 连接到本地网站并触发事件(按钮)

VB.NET connect to local website and trigger an event (button)

我真的没有一段代码可以给你看,因为我什至不知道如何开始编码。

我必须使用 VB.NET 执行以下操作:

  1. 连接到本地网站(https://10.0.0.55/
  2. 在该特定页面上触发事件(点击按钮)

    <div onClick="mySubmit('webEvent=START&webSector=0')">START</div>
    

目前我唯一知道的是您可以通过WebClient连接到网站。

    Dim webClient As New WebClient()
    webClient.BaseAddress = "http://10.0.0.55/"

将不胜感激。

提前致谢,

延斯

您可以使用 WebBrowser 控件:

导航到地址:

webBrowser1.Navigate("https://10.0.0.55/")

您可以在 DocumentCompleted 事件中调用单击。像这样:

webBrowser1.Document.GetElementById("id").InvokeMember("click")