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


Please Help Members By Posting Answers For Below Questions

Explain about the support of asp for vb script functionality?

527


Which event is triggered when mouse focus comes out of an element in the vbscript language?

509


What is the event handling in vbscript?

561


Which operator is used to concatenate the 2 values in the vbscript language?

556


What are the uses of vb script?

585






How to Import data from a file (file is on the desktop) to the data table

1577


Like OPTION EXPLICIT statement what are the other statements used in vbscript and their usage. Please post me all the statements please.

1619


what is the difference between modular and data and keyword driven framework

1738


Hello Guys, If any body looking for "worksoft certify tool training in bangalore", please contact me aimansaud@gmail.com

1045


What are the 2 ways to pass a value to the function?

511


How will you check that a variable is an array in vbscript?

542


What is the difference between javascript and vbscript?

532


Explain about .wsf files?

618


hi what is called GUI in QTP 8.2 and how can we test the apllication using GUI?

1787


Explain the scope of the variables using dim, public, and private keywords respectively.

715