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
Set srchobj=Description.Create() srchobj("type").value="text" srchobj("name").value="q" srchobj("html tag").value="input" browser("micclass:=google").Page("micclass:=google").webedit (srchobj).Set "qtp" what's wrong in my code pls tell me ? the above code working fine and i got my result pass,now i am trying to run the program it shows general run time error why?pls help me i am in learning stage ?
Develop a parameterized action that accomplishes the following a. Launch a browser of users choice ( example : IE, chrome etc) b. Open up a search engine (Google, Bing etc) c. Perform a search d. Click a particular link depending on the user’s choice ( 1st , 2nd or third link)
Mention when to use function procedures and what are its characteristics?
Mention what is the difference between vbscript and vba?
Mention what is variant in vbscript?
when we use filter funtiom invb script(QTP)
can anyone tell me the procedure of interview held in applabs
How are comments handled in the vbscript language?
Explain the string concatenation function in vbscript?
How are arrays declared in the vbscript language?
Explain about filter expression?
how does vb script help in web page designing? explain with example.
What is the purpose of regexp object in vbscript?
wht must be the interview question on corinthian information technology solutions incorporated.
Explain sga memory structures?