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
What is the script for database check point, bitmapchek point, regular expression ?
Explain measuring transaction.
Explain hybrid framework with advantages and disadvantages?
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....
Describe synchronization point.
When to use shared and local object repository?
Get the count of files of similar types from a folder.
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...
How to give a call to another action from one action?
What are the different types of checkpoints?
What is qtpro? What is quick test pro?
What are the trigger events in qtp?
What is quick test pro?
in data driven testing for performing operations which method is easy from manual test data,keyword view,or from database.and why?
Describe the differences between functions and actions in UFT?