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 r the verstions from 1st to present (verstions) of mercury tools (like winrunner,QTP,Loadrunner) ? Chandana

0 Answers   Mannar Company, Wipro,


Pls let me know completely about descriptive programming, where it is used, pls explain with a real time example of its occurence and the program code written in qtp.

3 Answers  


Hi, I am using 2 excel sheet.First excel sheet works fine with the script, if it opens the 2nd excel sheet,it works fine,but after finish all the rows it is giving the following error in the following line. InValid Procedure call or argument Line (178): "Browser("name:="&result,"application version:=internet explorer 7").Page ("title:=bgt.*", "index:=0").WebList ("name:=SearchType","html id:=Select1","location:=0").Select SearchType1". I have seen a web article says that,If we use any vbscript friendly name it may gives the above error-Invalid procedure call or argument not sure,Am I using any VBScript frienlyName? in the above line? [but the same line is perfecly working for first Excel ] It is little urgent. Any Help Thanks you

0 Answers  


what is test scheduling?

1 Answers  


What is a Run-Time Data Table? Where can I find and view this table?

4 Answers  






How can we use XML in QTP?

1 Answers  


Can we record a video in qtp recording??

1 Answers   BirlaSoft,


When we try to use test run option "Run from Step", the browser is not launching automatically why?

1 Answers  


Explain quicktest professional testing process?

0 Answers  


i need code for how to click on particular mail in utlook mail box .its urjent Thank You Balaji

0 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  


Hello, I am working on automating unix application using QTP via terminal emulator.Recording and playback works as i execute my test case. I need to parameterise my data now. Steps to be followed 1. go to the application TeWindow("TeWindow").Window("Connect").WinButton ("Connect").Click 2. Make a transaction to an account I am able to make transaction one at a time (one person when i run the script) and the script is as below and works fine. TeWindow("TeWindow").TeTextScreen ("TeTextScreen").Type "./4ee.sh" TeWindow("TeWindow").TeTextScreen("TeTextScreen").Type micReturn TeWindow("TeWindow").TeTextScreen("TeTextScreen").Sync TeWindow("TeWindow").TeTextScreen ("TeTextScreen").Type "a21100002" TeWindow("TeWindow").TeTextScreen("TeTextScreen").Type micReturn TeWindow("TeWindow").TeTextScreen("TeTextScreen").Sync TeWindow("TeWindow").TeTextScreen ("TeTextScreen").Type "tcccc" TeWindow("TeWindow").TeTextScreen("TeTextScreen").Type micReturn TeWindow("TeWindow").TeTextScreen("TeTextScreen").Sync TeWindow("TeWindow").TeTextScreen ("TeTextScreen").Type "test" TeWindow("TeWindow").TeTextScreen("TeTextScreen").Type micReturn TeWindow("TeWindow").TeTextScreen("TeTextScreen").Sync TeWindow("TeWindow").TeTextScreen("TeTextScreen").Type micF1 TeWindow("TeWindow").TeTextScreen("TeTextScreen").Type "6" TeWindow("TeWindow").TeTextScreen("TeTextScreen").Type micF1 TeWindow("TeWindow").TeTextScreen ("TeTextScreen").Type "xexit" TeWindow("TeWindow").TeTextScreen("TeTextScreen").Type micReturn TeWindow("TeWindow").TeTextScreen("TeTextScreen").Sync 3. Now i need to Make a transaction to the account for the list of people available from data table. How do i do this? Please let me know if you can Thanks, Chaya

1 Answers   Apex,


Categories