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 / ss
If duplicate values are there,then how many
time it is getting duplicated?
ItemsCount=Browser("creationtime:=0").page("title:=.*").WebList("name:=lccp_src_stncode").GetROProperty("allitems")
For i=0 to ubound(ItemsCount)
For j=i to ubound(ItemsCount)
If arr(i)=arr(j) then
print arr(i)&"is repeated"
End if
Next
Next
Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
Get the count of files of similar types from a folder.
Can you brief the hurdles you faced during Automation testing?
An action has both shared and local or associated to it and both have the same object in them. In the test which one will be considered?
How to use userdifined environment variables.Once we created in Environment tab which is at File--> Settings-- >Environment-->Userdifined
What are the various automation frameworks available in qtp?
Describe synchronization point.
Which environments does qtp support?
What are private functions in QTP? How they can be called from the function library?
Can any one explain me what is the procedure to connect the remote desk by using QTP 9.2 ?
Can we record using all the modes in a single script? Explanation with example is appreciated
Explain about the test fusion report of quicktest professional (qtp)?
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?
Tell me about qtp?
How to define array in qtp?
Why qtp always start action1 and does not start action?