How can i check elements sorted in dorpdown using qtp..

Answer Posted / lak

1) Create an array to capture all the Weblist items - call
it as appArray
2) Sort the appArray to display all items in ascending order

For i = 0 to UBound(itemArray)
itemArray(i)
Next

- Again there is no sort function which is readily
available. You would have to code for the sorting to
something on similar lines -

for i = UBound(appArray) - 1 To 0 Step -1
for j= 0 to i
if appArray(j)>appArray(j+1) then
temp=appArray(j+1)
appArray(j+1)=appArray(j)
appArray(j)=temp
end if
next
next

3) Save this as sortedArray. Compare some of your original
appArray items to the sortedArray items in terms of
positions.

If they are different, your verification is a fail and if
an exact match, its a pass.

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How to find the difference between 2 dates in qtp?

827


action contains public and private functions but do we resuable that action or not..If it is reusable How..plz tell me the ans

1838


How to write business scripts using object repository with different scenarios

1624


What is the default object synchronization timeout in qtp?

915


The structure of keyword driven frame work is like a folder structure the different sub folder are 1-functional libray folder 2-object repository folder 3- database folder 4-appliction1.xls 5-initalzation vbs file 6-sequence file 7-driver script 8-test case list file My question is whether these are in a local server machine or in our pc.((whether It like Vss). can u give example of driver script(code)

3032


How do you do batch testing in wr & is it possible to do in qtp, if so explain?

848


Explain types of descriptive programming?

822


What is the use of ordinal identifier in qtp?

789


Presently i am working on QTP 8.2 Version,i want to know features in 9.2 version, because i have not sufficient time to put the effort on the 9.2 version

1623


What is the difference between the design-time and run-time data tables?

818


how to test use the quality control .how to verify the image verification

2828


What is the difference between byref and byval in qtp?

805


Is there any pdf or online book for QTP Scripting? Let me know more about QTP Scripting.

2628


breef description of batch testing ?

1895


What are the factors on which script execution time is dependent?

825