【发布时间】:2012-04-13 16:38:36
【问题描述】:
我有一个简单的 VBScript 可以执行下一步操作:
- 打开浏览器
- 填写输入(登录名、密码等)
页面上有发送信息的按钮(看起来像)。 此按钮的单击事件不起作用,因为它是 GWT 按钮。 我想向这个按钮发送 MouseUp 事件。
如何使用 VBScript 来实现?
Function Main
Set IE = WScript.CreateObject("InternetExplorer.Application", "IE_")
IE.Visible = True
IE.Navigate "http://example.com"
With IE.Document
.getElementByID("login").value = "Login"
.getElementByID("password").value = "Password"
'It doesn't work
.getElementByID("div-button").MouseUp
End With
End Function
【问题讨论】: