08-06-2015, 04:42 PM
(This post was last modified: 08-06-2015, 04:49 PM by venkatesh9032.)
Hi People I Need a Great help from you Guys and much Thankful and appreciated.
I have 10 checkboxes in a page and it has respective labels like
abc <Checkbox1>
cab <Checkbox2>
.
.
.
.
abc is a label name and checkbox 1 is a checkbox ... Now u guys got the picture.
I need to click checkbox1 by sending abc as parameter.
If the parameter exists in the page click the respective checkbox..
I have written the following code.Please give a look up and provide your solution.
I have 10 checkboxes in a page and it has respective labels like
abc <Checkbox1>
cab <Checkbox2>
.
.
.
.
abc is a label name and checkbox 1 is a checkbox ... Now u guys got the picture.
I need to click checkbox1 by sending abc as parameter.
If the parameter exists in the page click the respective checkbox..
I have written the following code.Please give a look up and provide your solution.
Code:
Set objCheckbox = Description.Create
objCheckbox("micclass").value = "WebCheckBox"
Set objCheckboxcoll = Browser("abc").Page("abc").WebTable("BranchSelect").ChildObjects(objCheckbox)
Msgbox objCheckboxcoll.count
'Msgbox objWebElementcoll(0).GetROProperty("Innertext")
'For i = 1 To objCheckboxcoll.count
' If Trim(objCheckboxcoll(i).GetROProperty("label")) = Trim("NORTH HAZARD") Then
' objCheckboxcoll(i).set "ON"
' End If
'Next