If returnNum=0 Then
Reporter.ReportEvent 1,"Search result check","Fail"
Browser("百度一下,你就知道").close
ExitAction(0)
else
Reporter.ReportEvent 0,"Search result check","OK"
Browser("百度一下,你就知道").close
ExitAction(1)
' 定义一个空对象
Dim RecordObjec
set RecordObject=Description.Create()
' 给上面定义的空对象,添加一个html tag 属性,属性值为A
RecordObject("html tag").value="A"
Dim Recordlist
set Recordlist=Browser("百度一下,你就知道").Page("百度搜索_qtp").childobjects(RecordObject)
'listcount=Recordlist.count
'msgbox listcount
'Recordlist(14).click
keywordExist=Recordlist(14).GetROProperty("text")
msgbox keywordExist
returnNum=Instr(1,keywordExist,"qtp",1)
msgbox returnNum
If returnNum=0 Then
Reporter.ReportEvent 1,"Search result check","Fail"
Browser("百度一下,你就知道").close
ExitAction(0)
else
Reporter.ReportEvent 0,"Search result check","OK"
Browser("百度一下,你就知道").close
ExitAction(1)