这个是个简单的vbs脚本,使用opentwebst进行录制
1 'Use the command line below to launch the script (or just double click the .vbs file): 2 ' %windir%system32wscript.exe TwebstScript.vbs 3 4 Option Explicit 5 Dim core 6 Dim browser 7 Dim browser2 8 Set core = CreateObject("OpenTwebst.Core") 9 Set browser = core.StartBrowser("http://127.0.0.1/logain.php") 10 11 Call browser.FindElement("input text", "id=SYSUSERNAME").InputText("050000") 12 Call browser.FindElement("input password", "id=PASSWORD").InputText("password") 13 Call browser.FindElement("input button", "name=go").Click() 14 Call WScript.Sleep(2000) 15 set browser2 = core.findBrowser("url=http://127.0.0.1/main/*") 16 Call browser2.FindElement("img", "id=Image0").Click()
第二段内容是进入系统之后的新网页操作,点击一个id为image0的图标,进入代办事宜