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 / guest

Note : You need to take all the options of the weblist into
an array and try this logic

arr=array(1,2,4,1,2,6)
cnt=0
For i=0 to ubound(arr)

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

-Ganesh

Is This Answer Correct ?    4 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

If u r using library files (Instead of Check Points) , How do u do bitmap check ?

2049


can u explain the keyword driven framework with an example clearly how to create all the files and how to attach to main test.

6214


Which recording modes need more memory?

1069


what is clean sweep?

1996


tell me QTP standards ?plz

1937


What are the recording modes in qtp?

1053


Explain the types of object repository?

994


How many tabs are available in debug viewer pane?

1112


What is the parameterization?

1049


What is the extension of the recovery scenario file in qtp?

1000


How would you directly trigger javascript in a test?

1901


Problem with XML checkpoint in QTP ?

3926


In qtp, how you can remove the spaces from string?

999


Hi, Hope you viewers are doing fine with good health. What are the steps and connection parameters to connect to Oracle db ? Can you connect with just the Oracle client or Oracle XE ? Cheers!!

2996


Hi, Can anyone please tell me how to connect the QC with QTP using QTP script? Thanks in advance

1929