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
How are values assigned to string type and numeric type variables?
How to Import data from a file (file is on the desktop) to the data table
How are arrays declared in the vbscript language?
Why to use option explicit in vb script?
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 ?
What is the purpose of the err object in the vbscript language?
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..
Explain the constants in vbscript?
How to identify column in VSFlexgrid? My VSFlexgrid window is identified as 'Active X Control'
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
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.?
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?
What is the use of the formatdatetime function in the vbscript language?
How to Convert Hex color code to color name in VB Script?
What are the different types of loops available in the vbscript language?