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



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

Answer / 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

More QTP Interview Questions

How to change the priorities of the recovery scenario properties?

0 Answers  


Please help me by providing the License key for QTP 9.2, at guru_aarya@yahoo.co.in Best Regards Gururaj.B

0 Answers  


How to call the userdefined functions to script? If i am stored 'add()' function in Library functions folder. i want to cal that function in my script.

4 Answers  


how to retrieve data from flight resevation->reports

2 Answers   Wipro,


If I change the object name in one action will it be updated in all the actions? Or not?

0 Answers  






IS standard check point is very important than the other check points in QTP? If so why?

4 Answers  


What is environment variable in qtp and why to use it?

0 Answers  


Hi! Using Descriptive Programming How do we get Parent object for an object. Say, i want to get a parent object for a "Link" in a web page. thanks

3 Answers  


how u test a frame in a web page using QTP?

1 Answers   Accenture, IBM,


What processes will be required to manage updates to the web site's content, and what are the requirements for maintaining, tracking, and controlling page content, graphics, links, etc.?

0 Answers  


What are the differences between table and db checkpoints?

0 Answers  


What are the check points can be inserted without recording?

0 Answers  


Categories