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 to get the column count and column name from the resultset in the database connection program?
recording is not a good programming practice.How to write effective script without recording.Which is the correct method explain in detail
write a script for allinterview-submit Question first we've to select Choose Category,second select Sub- Category(Which is comes in to runtime)third select Question Type.for that give some descriptive and vb script
If our application contain one image while executing script application failed to show that image but you have to check that image by importing dynamically from other location... Can we use Check Points here on dynamically imported image?
IF application is a Java-based application means 2 0r 3 tier application. How the script will be in QTP. pls kindly give some sample script.
Difference between object identification and smart identification
Why do we use "Text checkpoint" If we can make use of it in "standard checkpoint" ?
I am using environment variable xml to give credenatials for login into unix. Is there any way we cam mask the password in the xml?
can i able to connect any version of qtp to any version qc
I am having trouble understanding #1 how to paramaterize a userid and password that I need to call in about 25 existing scripts. I need to know how to Create a Reuseable action for 25 existing scripts that will call the exact same userid and password? I need to know how to create a Reuseable action and then have it called by existing scripts being run in a batch.
Sometimes my QTP scripts works fine and sometimes its not though I am using same shared Repository and am not doing any changes in it.Even though for descriptive programming also its works fine and sometimes it does not work.my application is pretty stable.Could anyone please answer why am facing these types of issue??
what are the cases in which we use XML and accessibility check points.