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 qtp 9.5 ver software.but i don't know the license key. if anyone have license key please send it to my personal mail id(munir.reddy@yahoo.com

2 Answers  


Hi, I Would Like to Know which is the Best QTP Certification Training Institute in Hyd? Thanks in Advance kishan

1 Answers  


What is the extension of script and object repository files?

4 Answers   Crea,


write a script to validate the content in the web application. (do it by OR method) and (do it by Descriptive method by creating a description object..

0 Answers  


What do you mean by checkpoints in qtp?

0 Answers  






what is the difference between development and testing

1 Answers  


How can i select multiple items from a WebList bOX USING QTP

3 Answers   DuPont, Syntel,


I have the script like this: Browser("Philips Web Login").Page("Philips CL DMS2 Application").Frame("ScopeFrame").Link("DC3701737 (Active)").Click in which the value "DC3701737" will get changed and i have to use the same value in so many places. If i want to get that value "DC3701737" in to a variable, how? pls let me know if you didn't get the question. Help me out in this.

2 Answers  


How to test the mandatory fields in QTP?

1 Answers   SoftSolve, TE,


What is difference between design time and run time data table?

0 Answers  


what is difference between normal mode and fast mode?

1 Answers  


WHAT IS THE USE OF "FUNCTION GENERATOR" IN QTP?

9 Answers   CTS,


Categories