以下vb代码
Dim IE : Set IE = CreateObject("InternetExplorer.Application")
IE.Visible = True
IE.Navigate ("https://www.britishgas.co.uk/identity")
Do While IE.ReadyState <> 4 or IE.Busy: Loop
Dim HTMLDoc : Set HTMLDoc = IE.Document
HTMLDoc.getElementById("loginForm-email").Focus
HTMLDoc.getElementById("loginForm-email").Value = "user@domain.co.uk"
wscript.sleep 2000
HTMLDoc.getElementById("loginForm-next").Focus
HTMLDoc.getElementById("loginForm-next").Click
从powershell作为“ cscript testbtn.vbs”运行
从一台计算机运行时。在另一台计算机上运行时,它不会模糊并且不会单击按钮。
两台计算机均为W 10 IE 11