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

Our company is having a windows client server application developed in vb.net. so there is a treeview and i am not in a position to record the click events in QTP. so kindly help. Vivek

1571


What are the different types of recording modes?

542


how to use the QTP choose the data from oracle? e.g. i input the identity card NO. this will be add new record in the database ,and now i want get this record's prime key.

1326


how to test Web application using QTP software

1571


what the difference between shared repository and per action repository?

552






What the differences are and best practical application of Object Repository?

592


Explain different recording modes?

585


I am sathish , i want to test the Application of JIL.org ,Mobile Emulator ,by using QTP10.0. I am trying to do testing on that Application , but Child Objects are not identified by the QTP. Please can any one help me

1426


What is the architecture of your project? Can any one answer for this question plz........

1414


What is parameter in qtp?

682


in a web page How to check and display a particular word from a paragraph?

2044


What is ‘object spy’ and what is the function of object spy in qtp?

578


Can you write a script to check if the folder exists or not?

517


How to connect to a database?

581


i have doubt suppose iam purly working in manual, when i will get work to do on sql and performence testing? pls any one clarify doubt?

1559