There is a web Table where You will find Two Columns
First Column consist of Check box and Second column consist
of Test cases ID(Viz T1,T2,T3....Etc); If You select any
Test case ID, respective Check boxes to be checked write a
VBSCRIPT for this scenario?
Answer Posted / prathibha
rc=Browser().Page().webtable().rowcount
for i=1 to rc
cc=Browser().Page().webtable().columncount(i)
for j=1 to cc
if Browser().Page().webtable().getcelldata(r,c)="T1" or "T2" or "T3" then
set Owebchkbox=Browser().Page().webtable().getchilditem(r,c,"webcheckbox",index:=0)
Owebchkbox.set "on"
end if
next
next
Steps:- 1.Intially I'm trying to find the rowcount
2.iterate the no.of rows we have
3.find no.of columns we have for the row
4.iterate that from starting column with that row
5.find cell data value with getcelldata(r,c)="T1"or "T2"..etc
6.when it matches at that point get the childitem object with that row and column corresponding to the row and column no.where we had matched T1 or T2 ...
7.After obtaining the child item object ..do the necessary operation on it .like in our case we have to set it to on
Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
Explain about the support of asp for vb script functionality?
Which event is triggered when mouse focus comes out of an element in the vbscript language?
What is the event handling in vbscript?
Which operator is used to concatenate the 2 values in the vbscript language?
What are the uses of vb script?
How to Import data from a file (file is on the desktop) to the data table
Like OPTION EXPLICIT statement what are the other statements used in vbscript and their usage. Please post me all the statements please.
what is the difference between modular and data and keyword driven framework
Hello Guys, If any body looking for "worksoft certify tool training in bangalore", please contact me aimansaud@gmail.com
What are the 2 ways to pass a value to the function?
How will you check that a variable is an array in vbscript?
What is the difference between javascript and vbscript?
Explain about .wsf files?
hi what is called GUI in QTP 8.2 and how can we test the apllication using GUI?
Explain the scope of the variables using dim, public, and private keywords respectively.