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

How to "Turn Off" QTP results after running a Script?

4 Answers  


Hi! My OTP script has several bitmap checkpoints included which I check in the test results xml file. The test is for SAP 4.7. I need to save these bitmaps to files or at least export them to the html file using the export function in the test results viewer. Could you please help me with this problem? Thank you in advance! Best regards, Peter

0 Answers   TCS,


Hi, I'm a beginner in QTP and planning of a certification in QTP, but have no idea about it :P. Could anyone please tell me what certifications that a QTP- beginner can take? What is the fees and the syllabus for the certification? Please reply soon. Thanks Vidhya

0 Answers  


Why bpt?

0 Answers  


Could you please suggest a book to start with QTP and also a book for advanced concepts?

2 Answers  






descriptive program for a yahoo mail that is in yahoo mail suppose check box mailid subject assume it is like this format all things are in webtable the question is suppose some mail ids are there in that mailids i want to select the check box wich is before a@gmail.com and after that i want to click on delete button

0 Answers   DigiTech,


I am a newbie to QTP / Automation testing. I want to develop a script that creates a data file automatically with proper headings using VBScript in QTP.

0 Answers   Adea Solutions,


How can we log a defect in Testdirector from Q.T.P ?

2 Answers   EDS,


hi frinds i need help .i have 4 + yrs exp in testing and nearly 2 yrs exp in QTP and QC .currently iam working north fast 2 yrs iam looking for job in south is there any openings plz letme know my mail id is pbre1980@gmail.com

0 Answers  


How do we call Library Files(.vbs) in the Test Script Thanks in Advance...

6 Answers  


Explain the check points in QTP?

22 Answers   Gray Matrix, IBM, Microsoft, Prapan Solutions, Zensar,


how do i know how to use tools

0 Answers  


Categories