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 extension of the qtp local repository?
Hi, can explain the draw back of manual testing.plz send me the answer to my mail id deepthip1985@gmail.com
In keyward driven framework what will be the step for yahoo login page ,inbox logout,plz explain in detail
How to handle dynamic objects in quicktest professional?
If there is a change in the object type eg: A button is changed as link, 1. How to edit that in the shared object repository. 2.What options are available to edit the object within shared object repository other than copy from loca; 3.What would be the effect of the change in Coded Scripts within QTP and Functions stored in .vbs file which are loaded and used in QTP
What are the steps involved in the recovery scenario wizard?
what is clean sweep?
I want to open a Notepad window without recording a test and I do not want to use System utility Run command as well. How do I do this?
How to run a test using quicktest professional?
how u will evaluate the tool for test automation?
How to record application running on the Virtual machine?
banking project description for software tester
how do you parameterize search button from the website? the page is a single winobject and i have made a virtual object button of search button but search box can't be converted into a winedit and if we try to convert it into winedit the value we enter in a searchbox appears as numbers in the script so we arent able to parameterize.help!!!
What is the difference between a Function and Procedure in QTP?
What is the recovery scenario in qtp?