| || |
How to select a particular check box from a list
I need to select a particular check box as shown in screenshort based on the adajacent document link. Once checkbox selected I can perform a ragen of features available in application,
To identify any of the document link I can use code below and it works
If Browser("projectCentre QTP:TEST-AT:").Page("projectCentre QTP:TEST-AT:").Frame("RegRegRegFrame").Exist Then
set odesc = Description.Create
odesc("micclass").value = "Link"
odesc("text").value = Parameter ("Folder_Name" )
MainFolder = odesc("text").value
set LinkCollection = Browser("projectCentre QTP:TEST-AT:").Page("projectCentre QTP:TEST-AT:").Frame("RegRegRegFrame").ChildObjects(odesc)
linkcount = LinkCollection.count
If linkcount > 0 Then
For i = 1 to linkcount
Parameter("Return") = 1
Reporter.ReportEvent micPass, "Floder found and Opened ", MainFolder
Parameter("Return") = 0
Reporter.ReportEvent micFail, "Floder not found in the main rigister ", MainFolder
But next I need is once the link is identified say 'DEC 3' I have to slect the adajacent check box which cannot be identified based on webtable row neither it can be recorded as it will differ based on web link you want to select.
Q1:Can you guys suggest a wayout to select a particular checkbox
Q2:You can see the image of my object repository and object spy, The difference I am trying to under stand is in Object spy it shows checkbox as a child of webtable where as in object repository it doesn't. If I can have it as child of webtable in OR I can easily identify target checkbox based on rownumber and some looping code
Sorry guys I couldn't attach images of my screens
chk2 link2 ( chk2 check bx need to be checked based 'Link2'
Waiting for any kind of help
Re: How to select a particular check box from a list
Q1. Find the row in the webTable by the link text, then get checkbox by
WebTable.ChildItem (Row, Column, "WebCheckbox", 0).Set "On"
"object.ChildItem (Row, Column, MicClass, Index)"
Q2. In your OR you only need to add the WebTable and use code to find specific objects at the runtime