我正在尝试制作一个单击基于 html 的按钮的 VB 程序,但我被卡住了:/
按钮的 HTML 代码是
<button onclick=";return true;" class=" yt-uix-button yt-uix-button-default yt-uix-button-size-default" type="submit" role="button"> <span class="yt-uix-button-content">
Posten
</span>
</button>
我已经试过了
Dim allelements As HtmlElementCollection = WebBrowser1.Document.All
For Each element As HtmlElement In allelements
If element.GetAttribute("class") = " yt-uix-button yt-uix-button-default yt-uix-button-size-default" Then
element.InvokeMember("click")
End If
Next
但它不起作用提前谢谢