Internet Explorer 11中使用vb6实现网站自动化时出错
我正在使用vb6自动化网站(“”)填充。 适用于IE10及以下版本的代码Internet Explorer 11中使用vb6实现网站自动化时出错,vb6,windows-10,internet-explorer-11,Vb6,Windows 10,Internet Explorer 11,我正在使用vb6自动化网站(“”)填充。 适用于IE10及以下版本的代码 Dim WithEvents Web As SHDocVw.InternetExplorer Private Sub Form_Load() Set Web = New SHDocVw.InternetExplorer Web.Visible = True Web.Navigate "http://incometaxindiaefiling.gov.in/e-Filin
Dim WithEvents Web As SHDocVw.InternetExplorer
Private Sub Form_Load()
Set Web = New SHDocVw.InternetExplorer
Web.Visible = True
Web.Navigate "http://incometaxindiaefiling.gov.in/e-Filing/UserLogin/LoginHome.html"
End Sub
Private Sub Web_DocumentComplete(ByVal pDisp As Object, URL As Variant)
On Error GoTo aaa
msgbox " URL: " & URL
if url = "http://incometaxindiaefiling.gov.in/e-Filing/UserLogin/LoginHome.html" then
Web.Document.getElementById("Login_userName").Value = "abcde1111h"
Web.Document.getElementById("Login_userName").onchange
Web.Document.getElementById("Login_password").Value = "123456789"
Web.Document.getElementById("dateField").Value = "15/09/1954"
end if
Exit Sub
aaa:
MsgBox Err.Description & " URL: " & URL
End Sub
Private Sub Web_OnQuit()
MsgBox "OnQuit fired"
End Sub
在IE11(Windows 10)中,我的代码面临以下问题:
当使用SHDocVw.InternetExplorer控件导航到上述URL时
将在URL为空时触发第一个DocumentComplete事件。
然后触发OnQuit事件。然后再次使用URL“about:blank”触发DocumentComplete事件
当我使用“以管理员身份运行”选项运行exe时,它在IE11中工作,没有任何错误
请帮忙