Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

I have a list box which contains duplicate values e.g.
A,A,A,B,B,B,C,C,C.Now write a code in qtp to test the list
box .
Scenario #1 : I have to check whether any values are there?
Scenario #2 : If duplicate values are there,then how many
time it is getting duplicated?
Svenario #3 : how can I test presence of items in list box
ommiting duplicate values?

Answer Posted / ss

If duplicate values are there,then how many
time it is getting duplicated?

ItemsCount=Browser("creationtime:=0").page("title:=.*").WebList("name:=lccp_src_stncode").GetROProperty("allitems")

For i=0 to ubound(ItemsCount)
For j=i to ubound(ItemsCount)
If arr(i)=arr(j) then
print arr(i)&"is repeated"
End if
Next
Next

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Please provide specific examples of advanced/creative usage of QTP, including how impact & benefits for your project

2090


What is qtp window?

1002


I opened gmail login into gmail and i have to save (Pass or move) all the mail into notepad please give me code Thanks of all

2099


what is impact analysis on regression testing?

2482


What r the different filters in defect in quality center

3765


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

1750


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.

2069


What is the use of text output value in quicktest professional (qtp)?

1044


how will you check how many members visited the website www.infosys.com?

1919


What we are looking for is to load properties of object dynamically as for our application the global repository will pretty huge. It will be really helpful to us if something similar to following functions of Winrunner is available in QTP. #Define descriptor auto strDesc; #set property in the descriptor Gui_desc_set_attr(strDesc,?Class?,?Edit?); --- put other properties #Add Edit box to GUI Map Gui_add(? ?,strWindowName,strEditboxName,strDesc);

4005


What are the different recording modes?

995


Differences between text and test area checkpoints?

1117


how u will evaluate the tool for test automation?

1858


How to make qtp understand the difference amongst the same type of objects .suppose there are 5 check boxes in a page and I have to choose the 2nd one, how to do that through script?

968


How to test the login page in different ways in automation testing and i need code?

1942