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

Answer Posted / 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



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How to interact tool & application build in QTP?

1465


What is synchronization point in QTP?

678


For which type of project the iterative model is suitable?

1386


If there is a change in the object type eg: A button is changed as link, 1. How to edit that in the shared object repository. 2.What options are available to edit the object within shared object repository other than copy from loca; 3.What would be the effect of the change in Coded Scripts within QTP and Functions stored in .vbs file which are loaded and used in QTP

1302


What is a recovery scenario?

571






Suppose I want fail that check point? How can you do that?

599


What is expert view and keyword view?

626


Is any limitation to xml checkpoints?

563


Explain the differences between table and db checkpoints?

583


Get the count of files of similar types from a folder.

975


How to do the scripting. Is there any inbuilt functions in qtp as in qtp-s. What is the difference between them? How to handle script issues?

566


How can you write the scripts that operate on different objects depending on run-time information?

2122


What are the recording modes in qtp?

584


what r the main attributes of test automation?

1480


I hav installed QTP8.2, im working on webapplication, while running the script giving error msg like "QTPro.exe generated errors and will be closed by windows. You will restart the program. An error log is being created". Pls anybody what is the problem, what i have to do for this? Thanks...

1721