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 / bhargavi
A small change is required in the logic.
arr=array(1,2,4,1,2,6)
cnt=0
For i=0 to ubound(arr)
For j=i to ubound(arr) <-- Not j=0 but take j=i so that comparison will not be repeated
If i<>j Then
If arr(i)=arr(j) then
print arr(i)&"is repeated"
End if
End If
Next
Next
Is This Answer Correct ? | 1 Yes | 0 No |
Post New Answer View All Answers
what is supply chain management?
How many number of actions possible in qtp?
We stored into the objects OR and then write the scripting
What is the process of synchronizing qtp and aut?
Explain in brief about the quicktest professional automation object model?
hi all can any body explain how to write the script for finding the mandatory fields which are having [red Astrik sign (*)]
How do you send email with attachment from outlook using qtp ?
How does QTP identify an object?
I would like to directly import XL file and work on that XL file directly in QTp script in that XL sheet need to allocate workbench,XL sheet and generate two bar graphs automatically how to do that? plz let me know any answers?
Explain how you can replace string in qtp?
what is ODC and GDC?
What are the Test design techniques you uses in ur project?
What is environment variable in qtp and why to use it?
Where we use data driver in qtp?
How many types of recording facility are available in quicktest professional (qtp)?