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
Tell me about qtp?
Is it possible to call from one action to another action in qtp?
What are the steps involved in the recovery scenario wizard?
What is the short cut keys for the following?
What are output values and why they are used ?
Can testing be done on the production system, or will a separate test system be required? How are browser caching, variations in browser option settings, dial-up connection variabilities, and real-world internet 'traffic congestion' problems to be accounted for in testing?
Get the count of files of similar types from a folder.
Explain different types of checkpoints?
Can we create user defined functions in qtp?
How will you find the current time of the remote machine using QTP script?
How to check bitmap output value?
In the Hybrid framework, data can access the database, excel file, XML etc. Is it true?
what is the structure for the data driven framework
how can i sent QTP results to the Html, notefile ,xl file give me the code using g mail login page
Any body have QTP 9.5 licence key. please provide me at madhukar_dec30@yahoo.co.in