Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Click checkbox using its label name.
#1
Solved: 8 Years, 1 Month, 2 Weeks ago Sad 
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.

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
Reply
#2
Solved: 8 Years, 1 Month, 2 Weeks ago
Hi,
Can you provide screenshot of your application where CheckBoxes are displayed along with label name. My question is, are the CheckBoxes and Lable name are in same Column or different column. ?
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Help with Select checkbox from data table value jayraocourts 0 1,244 11-01-2019, 10:25 PM
Last Post: jayraocourts
  Childobject return wrong checkbox count.. VpnQTP 1 2,845 04-09-2015, 09:07 PM
Last Post: babu123
  How to select dynamic checkbox from web dropdown QA_Newbie 2 4,664 07-20-2014, 09:40 PM
Last Post: QA_Newbie
  How To pick up the particular mail in Post Login Gmail page and click on Checkbox akhandesh 0 2,833 12-02-2013, 01:35 PM
Last Post: akhandesh
  How to select the first checkbox ramya511 3 5,605 05-22-2013, 01:45 PM
Last Post: learnQtptips

Forum Jump:


Users browsing this thread: 1 Guest(s)