Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


How will u find that how many List boxes( and check boxes)
are present in one particular window

Answers were Sorted based on User's Feedback



How will u find that how many List boxes( and check boxes) are present in one particular window..

Answer / nanda

Hi,

try this code...


set odesc = discription.create

odesc("Class Name").value ="WinCheckBox"
odesc("native class").value="Button"

set checkboxcount= window("<window name>").childobjects
(odesc)

counts=checkboxcount.count

msgbox counts

u will get number in msgbox.

please ping me if there is any feedback.

Is This Answer Correct ?    5 Yes 0 No

How will u find that how many List boxes( and check boxes) are present in one particular window..

Answer / nanda

Hi,

try this code... i did some spelling mistake in above
answer..pls change that..

discription=description

Is This Answer Correct ?    5 Yes 0 No

How will u find that how many List boxes( and check boxes) are present in one particular window..

Answer / nanda

Hi,
then do some modification..

Just remove line Odesc("nativeclass") = "Button"

I think it will work now

If any queries..

nanda.dreddy@gmail.com

Is This Answer Correct ?    2 Yes 0 No

How will u find that how many List boxes( and check boxes) are present in one particular window..

Answer / akila

hi,
i tried this script. it's working fine but not giving
appropriate checkbox in the application

Is This Answer Correct ?    1 Yes 0 No

How will u find that how many List boxes( and check boxes) are present in one particular window..

Answer / kalyan

HI Every bodey,---

Any object present in the page is known as childobject.
Ex:-Link,Web Edit,Check Box,Web button,List box,etc...

If u want to coun the Listboxes (or)Check boxes you can
write below script.

---------CODE----------

set ochbox=description.create
ochbox("micclass").value="checkbox"

set chobj=Browser().Page().childobjects(ochbox)
n=chobj.count

msgbox n '(here you can get how many check boxes there in a
page)

for i=o to n-1
val1=chobj(i).getroproperty("innertext","name")
msgbox val1
next
-----------End---------
In the same way we can find Links,Webbuttons,Listboxes,etc..

Any doubts----mail to----mskalyan.smile@gmail.com

Is This Answer Correct ?    1 Yes 0 No

How will u find that how many List boxes( and check boxes) are present in one particular window..

Answer / venkatesh

Set oPageObject = Browser("browsername").Page
("pagename").Object
Set oTableObject = oPageObject.getElementsByTagName
("list")
iTotalTbl = oTableObject.length

Is This Answer Correct ?    0 Yes 0 No

How will u find that how many List boxes( and check boxes) are present in one particular window..

Answer / ramya

'Counting total number of lists

Set Odesc= Description.Create
Odesc("htmltag").value= Input
Set linkcollection= Browser("").page("").childobjects(Odesc)
Itemcount=linkcollection.count()
msgbox Itemcount

Is This Answer Correct ?    0 Yes 0 No

How will u find that how many List boxes( and check boxes) are present in one particular window..

Answer / softwaretester4u

very intresting question,but i never found in QTP my
experience .pls tell me if any one knows

Is This Answer Correct ?    0 Yes 2 No

Post New Answer

More QTP Interview Questions

What is a Web Table?

5 Answers   Kanbay,


i am trying to capture the URL from the open browser and store it. pls give me solution how we can do this in QTP. thanks

2 Answers  


how to create the varibles and how these are connect to qtp? plz tell me

3 Answers  


How should I click on the right click menu objects When I trying to add the object properties to the OR.It is showing only Window(Window).Not all the objects of the window. Also while recording I found No script. How to solve this>.

1 Answers  


i have .xls,.txt,.doc files are there (together). i want find only .xls file among them? how can we write function?

3 Answers   CTS,


write the regular expression for date format of mm/dd/yy?

10 Answers   CTS, HCL,


Explain the concept of how quicktest professional identifies object?

0 Answers  


Hi let me ask one questin 1.How to use outputof the one function input to the another function pls give the script for above 2.what is the purpose of action parameter , how to create it

2 Answers  


what is the difference between ClassName and class in QTP?

3 Answers  


your doing one project testing then how u know itis wheather web based application or windows based application?

2 Answers  


How to connect to a database?

0 Answers  


How to create configuration scripts

1 Answers  


Categories