【发布时间】:2016-02-20 00:50:10
【问题描述】:
我有一个小的 VBScript,它可以打开一个网页并输入我的登录凭据。但是,我总是遇到错误,不知道如何解决。
Call Main
Function Main
Set IE = WScript.CreateObject("InternetExplorer.Application", "IE_")
IE.Visible = True
IE.Navigate "https://x10hosting.com/sso/login"
Wait IE
With IE.Document
.getElementByID("identifier").value = "FAKEEMAIL@my.com"
.getElementByID("password").value = "FAKEPASS"
.getElementsByName("button button-rounded button-primary")(0).Submit
End With
End Function
Sub Wait(IE)
Do
WScript.Sleep 500
Loop While IE.ReadyState < 4 And IE.Busy
End Sub
错误是:
行:11 字符:9 错误:需要对象:'getElementsByName(...)(...)' 代码:800A01A8 来源:Microsoft VBScript 运行时错误
【问题讨论】:
-
@AnsgarWiechers 请看帖子。我当时编辑了