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

How are values assigned to string type and numeric type variables?

758


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

1763


How are arrays declared in the vbscript language?

764


Why to use option explicit in vb script?

808


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 ?

1788


What is the purpose of the err object in the vbscript language?

854


Could Anybody Please tell me What is the script for Find 3rd Largest element in the Array without using a SORT function int Find(int arr[], int size); Thanks in Advance..

2270


Explain the constants in vbscript?

754


How to identify column in VSFlexgrid? My VSFlexgrid window is identified as 'Active X Control'

3517


Hi anyone Can Send Solution to the Question wt m posting now Prepare Script for the Bellow Scenario? Login to Gmail Page Open Inbox check Mails save them in a Folder

1844


Write a function for Instr(). We need to write a function that works as same as Instr(). Code or Even pseudo code is good enough for me.?

2275


1) How can we use VB script in testing the application? 2) What all are the things(Software application to be installed in PC) we need to learn VBscript?

3786


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

770


How to Convert Hex color code to color name in VB Script?

4163


What are the different types of loops available in the vbscript language?

739