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
How to test results for qtp ?
how to convert 100 into hundred repees only and viceversa
How can we extract data like "Details","Result","Time" from the 'Run Error' result generated in QTP after run time errors are generated during a run & import the details etc...into excel sheet
I am getting an error "failed to open the XML checkpoint result viewer" in result window,after clicking on "View XML checkpoint results".Someone suggest me settings,if any...
Explain the qtp test phases.
What is text check point and text area check point?
Print the Prime numbers in below format only up to 20(Need commas also) 1,2,3,5,7,9,11,13,17,19
Do you know how to connect database? Can you tell me the procedures?
Hi iam shankar here, right now iam working on manual testing. i want to switch over automation tool qtp, right now iam taking training class outside on qtp, please let me know the cost of QTP tool for full version, wether it's an annual subscription or monthly subscription.
How to integrate QTP with QC using VB Scripting? What are the prerequisites to connect with QC?
Explain different types of action in qtp?
How many types of recording modes are there?
what is the difference betn QTP 8.0 AND PREVIOUS VERSION
If you have two monitors one is of 19inch and the 2nd one is of 24inch,if you want to write same QTP script in both the two monitors is there any changes required in the script?
How you create new action in qtp?