Can anybody help me by sharing the code for checkbox in qtp
using vbscript.

Answer Posted / kotike

for example you have 20 checkboxes in a webpage. If You
want check those check boxes. Then

Set oBrowser=Description.Create()
oBrowser("micclass").value="Browser"

set oPage=Description.Create()
oPage("micclass").Value="Page"

set oCB=Description.Create()
oLink("micclass").Value="WebCheckBox"

set cboxes=Browser(oBrowser).Page(oPage).childobjects(oCB)
msgbox cboxes.count 'it will display the no of checkboxes
in webpage

for i=0 to cboxes.count-1
cboxes(i).set "ON"
Next

'if you want uncheck use "OFF" instead of "ON"
set oBrowser=NOthing

regards,
mahi.kotike@gmail.com

Is This Answer Correct ?    8 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the script for database check point, bitmapchek point, regular expression ?

1844


Explain measuring transaction.

825


Explain hybrid framework with advantages and disadvantages?

784


hi, FOR 3+ QTP INTERVIEW, FOR EXAMPLE WE PUT ONLINE BANKING SYSTEM PROJECT IN OUR RESUME, IN PROJECT MANAGER ROUND...WHAT R THE MAJOR QUESTIONS ARE ASKED IN P.M? PLS TELL ME ATLEAST 10 QUESTIONS?.....AND IF POSSIBLE POST ANSWERS ALSO....

2694


Describe synchronization point.

832


When to use shared and local object repository?

842


Get the count of files of similar types from a folder.

1238


Do you know SQL? I know SQL but i don't have any experience...that's it..No more questions ...simply he said " you can leave for the day" ...guys prepare SQL Quires before attending interview in bank of america...

1541


How to give a call to another action from one action?

869


What are the different types of checkpoints?

811


What is qtpro? What is quick test pro?

835


What are the trigger events in qtp?

838


What is quick test pro?

848


in data driven testing for performing operations which method is easy from manual test data,keyword view,or from database.and why?

1590


Describe the differences between functions and actions in UFT?

832