TA的每日心情 | 难过 2016-10-8 11:16 |
---|
签到天数: 8 天 连续签到: 1 天 [LV.3]测试连长
|
《求助》
输入:
SystemUtil.Run"www.51testing.com"
Browser("micClass:=Browser").Navigate"bbs.51testing.com"
Browser("micClass:=Browser").Page("micClass:=Page").Sync:wait 1
checkURL=Trim(Browser("micClass:=Browser").Object.LocationURL)
If checkURL="Http://bbs.51testing.com" Then
Reporter.ReportEvent micPass,"Step 1","Passed"
Else
Reporter.ReportEvent micFail,"Step 1","Fail"
End If
Browser("micClass:=Browser").OpenNewTab:wait 1
testHWND = Browser("name:=欢迎使用选项卡浏览").GetROProperty("hwnd")
Browser("name:=欢迎使用选项卡浏览").Navigate"bbs.51testing.com"
Broeser("51testing软件测试论坛-首页").Page("51testing软件测试论坛-首页").Link("登录").Click
With Browser("51testing软件测试论坛-首页").Page("51testing软件测试论坛-用户登录")
.WebEdit("用户名").Set "yujie6823"
.WebEdit("密码").Set"xxxxx"
.WebButton("登录").Click:Wait 3
End With
oExist=Browser("51testing软件测试论坛-首页").Page("51testing软件测试论坛-首页").Link("退出").Exit (3)
If oExit Then
Reporter.ReportEvent micPass,"Step 3","Passed"
Else
Reporter.ReportEvent micFail,"Step 3","Failed"
End If
Browser("hwnd="&testHWND).Close
Browser("micClass:=Browser").Refresh:wait 1
oExist=Browser("51testing软件测试论坛-首页").Page("51testing软件测试论坛-首页").Exist (3)
If oExist Then
Reporter.ReportEvent micPass,"Step 4","Passed"
Else
Reporter.ReportEvent micFail,"Step 4","Failed"
End If
报错:对象的描述和当前显示在应用程序中的多个对象匹配,请想该对象描述中添加其他属性以使其可以唯一表示该对象。 |
|