05-22-2013, 01:45 PM
(This post was last modified: 05-22-2013, 01:45 PM by learnQtptips.)
If you need to check only the first checkbox, then you dont have to use the for..next loop as below
But if you have to compare the items with a particular deal then see below
Code:
Set Obj=Description.Create()
Obj("html tag").value="DIV"
Obj("outerhtml").value="<DIV class=x-grid3-check-col></DIV>"
obj("micclass").value="WebElement"
Set ObjChild= Browser("Revenue Editor").Page("Revenue Editor").Childobjects(Obj)
AllObj=ObjChild.count
ObjChild(0).Click 'first element is always a index 0
Code:
Set Obj=Description.Create()
Obj("html tag").value="DIV"
Obj("outerhtml").value="<DIV class=x-grid3-check-col></DIV>"
obj("micclass").value="WebElement"
Set ObjChild= Browser("Revenue Editor").Page("Revenue Editor").Childobjects(Obj)
AllObj=ObjChild.count
msgbox AllObj
For i = 0 to AllObj - 1
if ObjChild(i).GetRoProperty(<property name>) = "<deal string>" then ObjChild(i).click
Next