Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How to select a particular check box from a list
#2
Solved: 10 Years, 9 Months, 2 Weeks ago
Hi Umer,

Follow the below steps.

Step1: Add the required 'WebTable' Object into Obj.Repo

Step2: Retrieve the row count of the webtable.

Step3: Loop thru all the rows & retrieve required cell's data using 'GetCellData' method & Validate the current link text with expected link text.

Step4 : If the required link text is found in 'i'th row, then use 'ChildItem' Method & select the correspoding CheckBox present in the same row & Exit out of the Loop.

Refer the below example code:
Code:
Expected_Link="DEC 3"
rc= Browser("projectCentre QTP:TEST-AT:").Page("projectCentre QTP:TEST-AT:").Frame("RegRegRegFrame").WebTable("...").RowCount
For i=1 to rc
  Table_linkText=Browser("projectCentre QTP:TEST-AT:").Page("projectCentre QTP:TEST-AT:").Frame("RegRegRegFrame").WebTable("...").GetCellData(i,3)
If (Expected_Link=Table_linkText) then
  Browser("projectCentre QTP:TEST-AT:").Page("projectCentre QTP:TEST-AT:").Frame("RegRegRegFrame").WebTable("...").ChildItem(i,1,"WebCheckBox",0).Set "ON"
Exit For
End if
Next
Reply


Messages In This Thread
RE: How to select a particular check box from a list - by sreekanth chilam - 01-19-2010, 12:54 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  how to select value from google search box dropdown +QTP prajyot 0 2,678 06-28-2017, 06:30 PM
Last Post: prajyot
  Trying to create List box in excel sheet at Run time with values yes No JACKSPARROW 0 1,600 01-17-2017, 11:05 AM
Last Post: JACKSPARROW
  Compare second web list value according to the first web list value roselin6 1 2,667 10-07-2015, 09:14 PM
Last Post: supputuri
  Unable to select an item from weblist and unable to enter text in edit box estherindu 5 9,176 05-15-2012, 12:07 AM
Last Post: viswa
Rolleyes How to select multiple choices from Multi-Select weblist blavanya 3 9,541 01-03-2012, 05:55 PM
Last Post: shivu.hanu

Forum Jump:


Users browsing this thread: 1 Guest(s)