|
QTP9.2+IE8+XP环境执行到这一步时一直报错 “对象不支持此属性或方法: 'Browser(...).OpenNewTab'”
浏览器已经启用新选项卡了,可是还是不能执行。
'Step 1——————————————————————————————————————————————————————————————
SystemUtil.Run "www.51testing.com" '启动IE并进入指定网站
Browser ("micClass:=Browser").Navigate "bbs.51testing.com"
Browser ("micClass:=Browser").Page("micClass:=Page").Sync:Wait 1
'Checkpoint start——————————————————————————————————————————————————————
'通过自身属性接口获取Browse的URL用于Step 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","Failed"
End If
'End of checkpoint ————————————————————————————————————————————-
'Step 2 ————————————————————————————————————————————————————————
'通过<OpenNewTab方法>打开一个新选项卡
Browser("micClass:=Browser").OpenNewTab:Wait 1 |
|