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 |
c language is thre but what is the purpose of c++, java is there but what is the purpose of Advanced java ....why these are all versions are coming...whta is the problem?
How can i check items sorted or not in a weblist ? Give me the script for this...
what is keyword driven framework in qtp.
Can we Test Welcome Screens and Process Images with QTP
What r the different type of reports generated in Quality Center?
what is bultin funtaion in QTP &tell me five examples?
What is meant by Step Generator in Qtp How is it used? pls gimme in detail
How software tester can use constants and variables in scripts?
New to QTP: In a qtp flight booking application, I tried to parameterize the to and from drop down lists using data table, depending on ur drop down selection it will pop up a list of flights. Here I am not finding a way to select flight randomly from given list... Thanks in advance guys.
Deal All, Recently i face one interview question in one company. str="test12@#3456" In This i want to print like special character and numeric ,word in one script please tell me how to write the code for this Thanks Balaji
does test plan is in test strategy or test strategy is in test plan
I am using descriptive programming for my project.when QTP deosn't identity or recognize a object by record and playback method,is it possible to make QTP identify that object using descriptive programming? Note: The object doesn't have unique properties and same properties used in Record and playback are only available, no extra properties are defined.