TA的每日心情 | 无聊 2020-12-8 11:20 |
---|
签到天数: 605 天 连续签到: 1 天 [LV.9]测试副司令
|
回复 3# louqqson008
根据你说的意思,随便猜一点啦,有问题自己调调
Set webElementobj=Description.Create()
webElementobj("micClass").value ="WebElement"
set webelements=Browser("micClass:=Browser").Page("micClass:=Page").ChildObjects(webElementobj)
numbers=webelements.count
'假设你加的东西叫EM
checkText="EM"
For i=0 to numbers-1
webElementcheck=Trim(Browser("micClass:=Browser").Page("micClass:=Page").WebElement("micClass:=WebElement","index:="&i).GetROProperty("html tag"))
If webElementcheck= checkText Then
reporter.ReportEvent micPass,"EM has been added","pass"
End If
Next |
|