|
下面代码中出现提示"类型不匹配",请大家帮忙看下如何解决??谢谢!
Dim Url(10)
Url(0)="http://mp3.baidu.com/m?f=ms&rn=&tn=baidump3&ct=134217728&word=ww&lm=-1"
Url(1)="http://mp3.baidu.com/m?f=ms&tn=baidump3&ct=134217728&lf=&rn=&word=ww&lm=-1"
Url(2)="http://mp3.baidu.com/m?f=ms&tn=baidump3&ct=134217728&lf=&rn=&word=ww&lm=0"
For j=0 to 2
Browser("browser").Page("page").Sync
Browser("browser").Navigate Url(j)
If Common_Text_Check("browser","page","TH","榜单分类 ")=fail Then
Reporter.ReportEvent 0,"meiyou",""
else
Reporter.ReportEvent 2,"恭喜您","显示榜单分类文字"
Set LinkDesc=Description.Create()
LinkDesc("html tag").value="A"
LinkDesc("href").value="http://list.mp3.baidu.com/list/.*"
(循环第二次时下面这句提示"类型不匹配",如最下图)
Set OOOO=Browser("browser").Page("page").ChildObjects(LinkDesc)
Dim Num,arr(10)
arr(0)="MP3排行榜"
arr(1)="新歌TOP100"
arr(2)="歌曲TOP500"
arr(3)="中文金曲榜"
arr(4)="中文金曲榜"
arr(5)="中文金曲榜"
arr(6)="中文金曲榜"
arr(7)="中文金曲榜"
arr(8)="中文金曲榜"
arr(9)="中文金曲榜"
arr(10)="中文金曲榜"
Num=OOOO.count()
msgbox(Num)
If Num=0 Then
else
For i=0 to Num-1
OOOO(i).click
title=arr(i)+" - browser "
title1=Browser("browser").Page("page").GetROProperty("title")
Reporter.ReportEvent 0,"",title
Reporter.ReportEvent 0,"",title1
If title1<> title Then
Reporter.ReportEvent 1,"抱歉","榜单页Title不正确或者不规范"
else
Reporter.ReportEvent 2,"恭喜您","到达预期榜单页"
End If
Browser("browser").Page("page").Sync
Browser("browser").Close
Next
End If
End If
Next
[ 本帖最后由 yayali 于 2008-2-22 12:50 编辑 ] |
|