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

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

0 Answers  


Write a program to display the numbers in the below format using for loops? 1 2 3 4 5 6 7 8 9 10 11 12 and Write a program to display the numbers in the below format using for loops. 1 2 3 4 5 6 7 8 9 10

2 Answers  


Hi everybady, i have faced few Qns in one of i attended interview, please help me out with these below Qns. 1. how to join values without using join function? 2. how to compare values without using String compare function? 3. input is Bangalore, but i need output like this below format, what is function to use and get this outcome B A N G A L o R E 4. Input is "CapGemini" but uotput should be like this "inimeGpaC" 5. Input is 1 1 2 1 2 3 1 2 3 4 1 2 3 4 5 Can someone let me know results of this Qns, please. Thanks.

2 Answers   CSS Corp,


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

0 Answers  


How will you get the exponent of the given number in vbscript?

0 Answers  






why variable name should not exceed 255 characters?

0 Answers  


Explain about the functionality of vb script?

0 Answers  


when we use filter funtiom invb script(QTP)

0 Answers   TCS,


In what way program "hello world" you can write in vbscript?

0 Answers  


hi i am trying for testing job for 3+ experience(fake) can u suggest me what type of projects i can keep in my resume and how much of knoeledge i should have abt that project.thnks in advance.urgt plz

0 Answers  


who will create the object?

0 Answers   TCS,


What is byref and byval parameters in vbscript?

0 Answers  


Categories