[英]How do i click this button in VB?
This is the button element: 这是按钮元素:
<input type="image" class="btnClaim" src="http://cdn1.swagbucks.com/content/results/images/btnClaimPrize.png" onclick="sb_vd.capSubmit();">
I've tried this code: 我已经试过这段代码:
Dim allelements As HtmlElementCollection = WebBrowser1.Document.All
For Each element As HtmlElement In allelements
If element.GetAttribute("class") = "btnClaim" Then
element.InvokeMember("click")
but it does not click the button. 但它不会单击按钮。 How do I programmatically click this button? 如何以编程方式单击此按钮?
It is possible with javascript javascript是可能的
window.onload=function()
{
img_click();
}
function img_click()
{
//do the code
}
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.