Can anybody help me by sharing the code for checkbox in qtp
using vbscript.

Answer Posted / 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



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is object spy in quicktest professional?

707


How do I lauch my test website using code from qtp in different environmet, uat and PPTE?

1562


i am trying to automate yatra.com,in that site, when i go to automate the Leaving from field showing as a WEBEDIT, but when i enter 1 or 2 char, it displaying dropdownlist, i try to use keyboard automation to select the item from that list but it is not possible, can anybody help he. Thans for posting the Answer

3655


How to suppress warnings from the test results page?

688


What are advantages of test automation?

770






How to perform cross platform testing and cross browser testing using qtp? Can you explain giving some example?

635


how to find that tools work well with your existing system?

1490


What are the different recording modes and how do they work?

700


can any boby tell me what is method or steps to connect the remote desk top by using QTP 9.2 version?

1705


Hi All, we are using QTP Automation Scripts to test SAP. I recorded QTP Automation Scripts in English-based SAP GUI. Now we have to test a French-based SAP sytem and use the same scripts. The QTP scripts are failing when executed on the French-based SAP System due to Object Recognition Issues. What can we do? Do I re-record the scripts in the French-based SAP system?

2421


Hi All, issue is related to handling pop up script generated in IE, and run on mozilla. In App Under Test, when we get the alert pop ups, we just click ok button. if we need to run the same code on mozilla it will not identify . so we will check browser if browser(*).dialog(IE object).exits browser(*).dialog(IE object).winbutton(OK).click else 'by default mozilla browser(*).dialog(mozilla object).page(*).webbutton(OK).CLICK END IF But my qustion is. Do we write the above piece of code where ever we get such kind of pop ups from the application like alert pop up, confirmation pop up.... OR do we have any other alternative way to do this by using any functions in Recovery Scebarios? If Any of u know idea please do help me in this regard. or send answer to kravimb@gmail.com

1545


What is qtpro? What is quick test pro?

674


What are the common defects found in your project? (in qtp interview)

1696


could any help me please, how to work on visual foxpro application using UFT

1863


Is it possible to call from one action to another action in qtp?

676