用于自动化IE的VBS脚本

时间:2016-02-18 17:25:17

标签: login vbscript

我有一个使用用户名和密码登录页面的脚本。我并不完全熟悉VBS,但我无法点击下一页(登录界面后)的按钮。有什么建议吗?

Set objIE = CreateObject("InternetExplorer.Application")
objIE.Top = 0
objIE.Left = 0
objIE.Width = 1400
objIE.Height = 800
objIE.AddressBar = 0
objIE.StatusBar = 0
objIE.Toolbar = 0
objIE.Visible = True 'We will see the window navigation

objIE.Navigate("http://www.myurl.com/")
Do
Loop Until objIE.ReadyState = 4
objIE.Document.GetElementByID("txtUsername").Value = "Username"
o

bjIE.Document.GetElementByID("txtPassword").Value = "SecurePass"
    objIE.Document.GetElementByID("btnLogon").Click

    WScript.Sleep 5000
objIE.Document.getElementsByClassName("btn-text")

这是HTML:

<td class="btn-text">
 <em unselectable="on" class=""><
   button type="button" id="click-button" class="123-btn">CLICKME</button>
 </em>

0 个答案:

没有答案