Browser("***").Page("****").WebButton("搜索").Click Set LinksDescription = Description.Create() LinksDescription("html tag").value="A" set LinksChildObj=Browser("*****").Page("****").ChildObjects(LinksDescription) linkscount=LinksChildObj.count Dim i,text,sertchResult j=0 For i=0 to linkscount-1 text= LinksChildObj(i).GetRoproperty("text") Set myReg= New RegExp myReg.Pattern ="等一分钟" myReg.IgnoreCase = True myReg.Global = True If myReg.test(text) Then j=j+1 Next 'msgbox(j) 'msgbox(LinksChildObj(j-1).GetRoproperty("text")) k=randomNumber(0,j-1) msgbox(k) LinksChildObj(k).Click版权声明:原创作品,转载时请务必以超链接形式标明本文原始出处、作者信息和本声明,否则将追究法律责任。 本文出自aslandhu的51Testing软件测试博客:http://www.51testing.com/?194902