2. 录制操作
脚本如下:
Sub Main
Dim Result As Integer
Dim Temp as Integer
//启动ie,连接到http://192.168.1.42
StartBrowser "http://192.168.1.42", "WindowTag=WEBBrowser"
//让ie窗口获得焦点
Window SetContext, "WindowTag=WEBBrowser", ""
//打开新的页面
Browser NewPage,"HTMLTitle=Dynaweb EPS 2003企业门户服务器",""
//点用户名文本框
EditBox Click, "Name=username", "Coords=35,12"
//输入用户名密码
InputKeys "admin{TAB}jetspeed"
// 点登陆
PushButton Click, "Name=submit"
//进入新页面
Browser NewPage,"HTMLTitle=Dynaweb EPS 2003企业门户服务器",""
// 点退出连接
HTMLImage Click, "Index=7", "Coords=11,7"
//关闭ie
Window CloseWin, "", ""
End Sub
3.回放 测试通过