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
What are the advantages of vbscript?
How do i automate a website www.flyashx.com without having any test cases witin a week time.
What are the 2 ways to pass a value to the function?
Explain the constants in vbscript?
why variable name should not exceed 255 characters?
Explain about scrrun.dll?
Can u describe what kind of testing are for OTC derivates by banks.
i am having some basic knowledge in c and VB 6.0. i qtp i want to know how to write the codings. by recording it is generating lot of codings. for example i want to test the text box. senerio is text box should not accept alphabets if it accept alphabets we should return fail status if it get number we should return pass status. how to write coding in vb script please help me
What is difference between vbscript and vba?
What are keywords in the vbscript language?
Which in-built function related to an array joins substrings into one string in the vbscript language?
Mention what is variant in vbscript?
Can any one provide code for Mid(string,start[,length]). I have been asked to write code for Mid(). i.e We need to define our own function say MyMid() which should behave same like built-in Mid function
Mention the rules for using option explicit statement?
Explain few date functions in vbscript?