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
What are the steps involved in recovery scenario wizard?
Is it possible to split an action? How?
distinguish between old version and new version QTP features.
I have qtp 9.5 demo ver,I am not able to record the yahoo broeser.so anyone can tell me what setting i have to do in QTP for yahoo brower recording. why its not recognise the object of yahoo browser????
how many maximum number of virtual users we can create?
Explain the types of properties that quick test learns while recording?
Explain about business process component? types and usage?
If you giving priority as p0, as a developer if I give priority as p2, What happens In user defined function ?
when to start the automation?
How smart identification works in qtp ?
How to handle Java tree in QTP?
If I change the property value at runtime is it effect is object repository?
How to Get the Run-time value of an object under that web app under Test to the local data table sheet of that Action?
Could any one tell me "How can i recognize my cursor position using QTP 9.2" Give me a scripts for this
Explain QTP using different development techniques ?