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
How do you do batch testing in wr & is it possible to do in qtp, if so explain?
What kinds of security (firewalls, encryptions, passwords, etc.) will be required and what is it expected to do? How can it be tested?
Dis advantages of XML checkpoint ?
Hi.. I want to do parametrization for selecting perticular flighr say XYZ by using local table: criteria: 1.If flight is available msgbox "Flight is available" and then select flight from flight table and click to ok button after that as enter username and ticket no and then stop 2. otherwise msgbox " Flight is not available" and stop Please help me out ..and let me know your responses on dipak.bachhav@gmail.com Regard, Dipak
What are some test assets and related extensions of qtp?
could any help me please, how to work on visual foxpro application using UFT
When Recovery scenario actually starts while testing the application?
While spliting an action in QTP 10.0 getting an error : "This Line is a part of Script Block.You cannot split the action on this line." how to re-solve this and split the script into actions?
I want to read XML file loaded in Quality center and compare the values with the values displayed in Application (web table).How can I do that
Are Shared ORs read-only?
Anybody plz give, How do you test aframe in a web page? If page cotain text message or Images, tables?
What will be happen if i load object repository at run time, but it has already associated.
Do you know how to connect database? Can you tell me the procedures?
HI, pls help me on this, iam not able to capture getcelldata value in javatable... msgbox javawindow("").javatable("").getcelldata(3,3) but it diaplays empty...
how will you check how many members visited the website www.infosys.com?