|
回复 1# yujie6832
SystemUtil.Run "www.51testing.com"
Browser("51Testing软件测试网-中国软件测试人的精神家园").Page("51Testing软件测试网-中国软件测试人的精神家园").Link("软件测试论坛").Click
Wait 5
checkTitle=Browser("51Testing软件测试论坛 软件测试 |").Page("51Testing软件测试论坛").GetROProperty("title")
msgbox checkTitle
If Instr(checkTitle,"论坛") <> 0Then
Reporter.ReportEvent micPass,"Step2","Pass"
Else
Reporter.ReportEvent micFail,"Step2","Fail"
End If
Browser("51Testing软件测试网-中国软件测试人的精神家园").Close
Browser("51Testing软件测试论坛 软件测试 |").Page("51Testing软件测试论坛").Link("[QuickTest Pro]").Click
wait 5
checkTitle1=Browser("51Testing软件测试论坛 软件测试 |").Page("51Testing软件测试论坛").GetROProperty("title")
msgbox checkTitle1
If Instr(checkTitle1,"QuickTest Pro") <> 0Then
Reporter.ReportEvent micPass,"Step3","PASS"
Else
Reporter.ReportEvent micFail,"Step3","FAIL"
End If
With Browser("51Testing软件测试论坛 软件测试 |").Page("51Testing软件测试论坛")
.Link("51Testing软件测试论坛").FireEvent "onmouseover":Wait 2
.Link("我要做专家").Click
End With
checkTitle2=Browser("51Testing软件测试论坛 软件测试 |").Page("51Testing软件测试论坛").GetROProperty("title")
msgbox checkTitle12
If Instr(checkTitle2,"专家") <> 0 Then
Reporter.ReportEvent micPass,"step5","PASS"
Else
Reporter.ReportEvent micFail,"step5","Fail"
End If
Set odesc=Description.Create()
odesc("micClass").Value="Link"
Set Lists=Browser("51Testing软件测试论坛 软件测试 |").Page("51Testing软件测试论坛").ChildObjects(odesc)
NumberOflists=Lists.Count()
msgbox NumberOflists
mark=0
theThird="[你问我来答第31期]:如何快速准确获得性能监控数据?(已结束)"
theNinth="[你问我来答第30期]:SQL调校(已结束)"
For i=0 To NumberOflists -1
linkname=Trim(Browser("51Testing软件测试论坛 软件测试 |").Page("51Testing软件测试论坛").Link("micClass:=Link","index:="&i).GetRoproterty("innertext"))
If linkname=theThird Or linkname=theNinth Then
mark=mark+1
End If
If mark=2 Then
Reporter.ReportEvent micPass,"setp6","Passed"
Exit For
End If
If i=NumberOflists -1 Then
Reporter.ReportEvent micFail,"step6","failed"
End If
Next
红色字体部分报错, |
|