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
If u r using library files (Instead of Check Points) , How do u do bitmap check ?
can u explain the keyword driven framework with an example clearly how to create all the files and how to attach to main test.
Which recording modes need more memory?
what is clean sweep?
tell me QTP standards ?plz
What are the recording modes in qtp?
Explain the types of object repository?
How many tabs are available in debug viewer pane?
What is the parameterization?
What is the extension of the recovery scenario file in qtp?
How would you directly trigger javascript in a test?
Problem with XML checkpoint in QTP ?
In qtp, how you can remove the spaces from string?
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!!
Hi, Can anyone please tell me how to connect the QC with QTP using QTP script? Thanks in advance