If there are 100 checkboes in a page then how can we select 10th & 11th & 14th chexkboxes at once through descriptive programing in QTP using vb script.
Please send the answers...
Answers were Sorted based on User's Feedback
Answer / ayushi saxena
set ocheck=description.create
ocheck("micclass").Value="WebCheckBox"
set checkcol=browser("micClass:=Browser").page("micClass:=Page").childobjects(ocheck)
for i=0 to checkcol.count -1
if i=9 OR i=10 OR i=13 then
checkcol(i).set "ON"
end if
next
Is This Answer Correct ? | 8 Yes | 0 No |
Answer / veeru
Below code saves sometime
set ocheck=description.create
ocheck("micclass").value="WebCheckbox"
set objCheckboxes = browser("Creationtime:=0").page("micclass:=page").childobjects(ocheck)
objCheckboxes(9).Set "ON"
objCheckboxes(10).Set "ON"
objCheckboxes(13).Set "ON"
Is This Answer Correct ? | 2 Yes | 0 No |
Answer / vamshi
browser("title:=.*").page("title:=.*").webcheckbox("name:=.*","index:=9").set "on"
browser("title:=.*").page("title:=.*").webcheckbox("name:=.*","index:=10").set "on"
browser("title:=.*").page("title:=.*").webcheckbox("name:=.*","index:=13").set "on"
because index value starts from zero
Is This Answer Correct ? | 1 Yes | 2 No |
Answer / ranga
set ocheck=description.create
ocheck("micclass")="webCheckbox"
set checkcol=browser().page().childobjects(ocheck)
for i=0 to checkcol.count -1
if i=9 and i=10 and i=13 then
checkcol(i).set "ON"
end if
next
Is This Answer Correct ? | 3 Yes | 8 No |
Answer / johnson
set ocheck=description.create
ocheck("micclass")="webedit"
set checkcol=browser().page().childobjects(ocheck)
for i=0 to checkcol.count -1
if i=10 and i=11 and i=14 then
checkcol(i).set "ON"
end if
next
Is This Answer Correct ? | 1 Yes | 16 No |
What is the difference between byref and byval in qtp?
Can you import and export data from XLS and how?
Can you tell me any books or websites to learn VB Script for QTP ??
How do you test the different ads displayed in the Inbox home page of Yahoo. Once u login Yahoo mail, in inbox page there will a banner, where different ads are scrolling, how do you test that using qtp?
How to convert non-reusable action into reusable action in QTP?(i know by default QTP will take it as a non-reuable action )(Chandana) plz urgent?
How to pass parameters to Actions Pls anybody can give the answer.. Thanks in advance...
MANUAL TESTING, AUTOMATION TESTING QTP,QC , Load Runner , SELNEIUM ONLINE TRAINING
If an application name is changes frequently i.e while recording it has name "Window1" and then while running its "Windows2" in this case how does QTP handles?
Where to use Property Let, Property Get, Property Set in UFT
What are the Automation Limitations??
How to identify flash application when the qtp is not identifying the flash application objects.
what is Compile Module in QTP? what exactly it contains Functions or Actions?