vb代码有问题,基本上试着用webkit自动单击网页上的一个按钮,但它不起作用。
工作代码:
'WebKitBrowser1.Document.GetElementById("email").SetAttribute("value", TextBox1.Text)
WebKitBrowser1.Document.GetElementById("pass").SetAttribute("value", TextBox2.Text)非工作代码:
WebKitBrowser1.StringByEvaluatingJavaScriptFromString("Document.getElementById('loginbutton').click()")错误:
对COM组件的调用返回了HRESULT E_FAIL。
发布于 2015-07-29 17:32:23
要在WebKit中使用java id和自动单击,请使用以下示例代码:
WebKitBrowser1.StringByEvaluatingJavaScriptFromString("javascript:void(document.getElementById('persist_box').click())")https://stackoverflow.com/questions/31027512
复制相似问题