How can i count the list box elements in QTP ?using script
plz explain me (Chandana)

Answers were Sorted based on User's Feedback



How can i count the list box elements in QTP ?using script plz explain me (Chandana)..

Answer / minni

u can use GETITEMCOUNT to count the items in a list
box.For an example see the below script.

msgbox Window("flightreservation").Wincombobox
("flyfrom:").getitemcount

Is This Answer Correct ?    25 Yes 2 No

How can i count the list box elements in QTP ?using script plz explain me (Chandana)..

Answer / sri satya

Hi
You can use this:
Count =Browser("title:abc").Page("title:abc").WebList
("name:=xyz").GetROProperty("items count")
msgbox Count

Is This Answer Correct ?    14 Yes 6 No

How can i count the list box elements in QTP ?using script plz explain me (Chandana)..

Answer / pbre

hi you can try this one

browser("SCP").Page("SCP").WebList("ctl00$WebPartManager1
$ResultSu").Click

a = browser("SCP").Page("SCP").WebList("ctl00
$WebPartManager1$ResultSu").GetROProperty("items count")
msgbox a
For i=1 to a
c =browser("SCP").Page("SCP").WebList("ctl00$WebPartManager1
$ResultSu").GetItem(i)
reporter.ReportEvent micPass,c,c

Next

Is This Answer Correct ?    4 Yes 4 No

How can i count the list box elements in QTP ?using script plz explain me (Chandana)..

Answer / rajaputra

url="http://corp.naukri.com/mynaukri/mn_newsmartsearch.php?xz=2_0_5&id="
Systemutil.Run "Iexplore.exe",url
set oDesc= Browser("name:=Mynaukri : naukri.com - India's
No.1 Job Site")
itemcount=oDesc.WebList("name:=qe").GetROProperty("items count")
msgbox "Number of Items in Experience List= "& itemcount
itemcount=oDesc.WebList("name:=qm").GetROProperty("items count")
msgbox "Number of Items in Minimum Salary List= "&itemcount

Is This Answer Correct ?    3 Yes 4 No

How can i count the list box elements in QTP ?using script plz explain me (Chandana)..

Answer / nani

The Following script displays the number of items in the
list box.

intFieldItemsCnt =CInt(GetProperty(Browser
("Browsername").Page("Pagename").Weblist
("weblistname"),"items count"))

msgbox intFieldItemsCnt

Any doughts feel free to make a mail to: nani4urs@gmail.com

Is This Answer Correct ?    3 Yes 8 No

How can i count the list box elements in QTP ?using script plz explain me (Chandana)..

Answer / karna

Thank you.. it works for me...

Is This Answer Correct ?    0 Yes 6 No

Post New Answer

More QTP Interview Questions

I have to pass all the test cases into gmail userid and password using functions please give me code thanks have anice and greate day

2 Answers  


What is Modular framework and Keyword drive framework? Explain

4 Answers  


Hi All, I have QTP installed on my machine but the application under test (AUT) is on remote desktop (i.e. I first connect to remote desktop from my machine in order to run the application). I am able to record the script successfully with QTP running on my machine and application running on remote. However, when i run the recorded script, system fails to run it and indicates me that it does not identify the object. Is it possible to record and play while QTP and AUT are not on same machine?

7 Answers   ABC,


How will you report the bug and explain the defect tracking sheet you handled?

0 Answers   TCS,


Distinguish between manual testing and automation testing

2 Answers   HCL,






how to parameterizing values from an excel sheet in Quick test professional?

1 Answers  


i need to learn the descriptive programming very well so for that what to do am reading the qtp user mannual but it is not so any materials or links with examples i want please help me

2 Answers  


what is description object?

0 Answers  


Difference between keyword driven test and DDT?

1 Answers  


can any body tell me all of the release dates of QTP?????..... thanks in adv!

3 Answers  


hi nani my doubt is how does qtp process metrix related to software process.

0 Answers  


what is virtual object?

2 Answers  


Categories