Can anybody help me by sharing the code for checkbox in qtp
using vbscript.
Answers were Sorted based on User's Feedback
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 |
Answer / ashish
Set myPage = Broeser("creationtime:=0").Page("title:=.*")
Set desc=Description.Create
desc("micclass").value="WebCheckBox"
desc("html tag").value="INPUT"
set cboxes=myPage.childObjects(desc)
for i=0 to cboxes.count-1
cboxes(i).set "ON"
Next
'if you want uncheck use "OFF" instead of "ON"
set cboxes=NOthing
set desc=NOthing
set myPage=NOthing
regards,
ashishkrsahu@gmail.com
| Is This Answer Correct ? | 2 Yes | 1 No |
How do know the number of browsers opened?
what is the diffrence between script and Language ? (Chandana)
Test script is generated and it is enhanced.It is required to be saved.But the disk space is insufficient.You are not permitted to delete any scripts.How are you going to save?
how to change the properties of object during run time . plz give the code using flight reservation
Mention the different actions types of qtp.
Hi,All How to change background color of a cell in excel using qtp and that too with out using Excel Object.(I am importing the excel sheet by using ImportSheet method)
does qtp need record and playback in realtime. plz tell exactly wat happens
How can we write script for a .net application in QTP? Can we use VB Script for .net application.
we are submitting data one form to another form.defaultly it is time period set as 5sec. but it is taken 15sec what to do
How many test scripts are prapare in ur project(HeathCare Insurance).
write vb script code to delete the duplicate values in an array.
Can we create user defined functions in qtp?