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
hi, can u tell me the QTP TEsting process in present real time companies?(beware of this... now a days Recording is not using,, only DP) and don't tell note book answers like step 1 spep2....like this .......post answer with professional skills in simple english words) thank u
What is qtpro? What is quick test pro?
In qtp, how you can remove the spaces from string?
What is the extension of the qtp local repository? If it is .mtr then what is .bdb extension stands for?
Hi, I got error message as "object does not support this property or method: "Test.Actions" when i execute the following line of script on QTP 9.0 Dim qtApp, qtRep Set qtApp = CreateObject("QuickTest.Application") Set qtRep = qtApp.Test.Actions("Action1").ObjectRepositories Can anyone tell me where i am wrong.
whow much strong on VB and C?
How will we compare the texts in the two word files using QTP writing the script in Descriptive Programming. Thanks
What is QTP testing process?
How to do call a output parameter from one action to another action??/
Explain the difference between data driven testing and parameterization ?
What are the recording modes in wave event?
Is it possible to change the values of analog recording?
What is the extension of the qtp local repository?
How to find the difference between 2 dates in qtp?
Write a script to verify font style and color of a windows object using descriptive programming