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?



There is a web Table where You will find Two Columns First Column consist of Check box and Second ..

Answer / 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

More VB Script Interview Questions

what is the function to display current date?

4 Answers  


How many types of operators are available in the vbscript language?

0 Answers  


why do u choose to go for testing why cant for devoloping

0 Answers  


What is the use of the date function in the vbscript language?

0 Answers  


. Program for sorting of numbers in vb script?

2 Answers   Talent Sprint,






Hello friends..... Can any give the methods for Ms-Access, and Mozilla firefox in Automation Object Model in QTP. Please give me currect answers... if you do not understand my question please don't give answers. Thanking you.

0 Answers  


write a program to display configuration of a local system with the help of vb script.

0 Answers  


How to open browser in vb script?

0 Answers  


If a calulator having 3 buttons (of any number)in 3 of them one is not working properly due to which answer is wrong always. write a script to find out which button is not working properly ?

0 Answers  


How to write functions and sub in vb script?

0 Answers  


what is the object hyrarchy in QTP for a web based application

0 Answers  


Explain the functionality of vbscript?

0 Answers  


Categories