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



If there are 100 checkboes in a page then how can we select 10th & 11th & 14th chexkboxes at..

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

If there are 100 checkboes in a page then how can we select 10th & 11th & 14th chexkboxes at..

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

If there are 100 checkboes in a page then how can we select 10th & 11th & 14th chexkboxes at..

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

If there are 100 checkboes in a page then how can we select 10th & 11th & 14th chexkboxes at..

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

If there are 100 checkboes in a page then how can we select 10th & 11th & 14th chexkboxes at..

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

Post New Answer

More QTP Interview Questions

I have a login page like username, password and login. I have to pass the 50 user names and 50 passwords but how can i test this page with out using parameters?

2 Answers  


Hi Frenz... I would like to take up the QTP certification . Can anyone tell me what is the procedure. n if anybody have the study materials pls fwd it to jkpunathil@gmail.com

0 Answers  


how to compare two excell sheets by using vbscript??

2 Answers  


is we can import the object repository from external source. if it so then how?

5 Answers  


How can you identify the browser and its information using QTP script?

0 Answers  






what is run-time data?

0 Answers  


Explain the concept of object repository?

0 Answers  


How do we create and run the scripts with out using O.R. ?

5 Answers  


how to get no.of non empty rows in a excel sheet through vb-script

2 Answers   HP,


I have an application running in Linux server. I am reaching the application through emulators like telnet. My operating system at the client side is Windows XP. Using emulator I am connecting the Linux server and working on the application. Can I automate the testing of the software running in Linux server using QTP. In short, does QTP support the applications running in Linux servers.

1 Answers  


is it possible to operate(on/off)the capslock using qtp

2 Answers  


Can u call winRunner scripts from QTP?

4 Answers  


Categories