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 open QTP in Real time.after getting the qtp window how to log in .pl answer real time people

3 Answers   GE,


actually how many hours per one day we will work on automation(qtp) in real time

1 Answers   Synechron,


What is exact meaning of Database Checkpoint in QTP 9.2 and what are the different types of the database check points?

0 Answers  


Explain the checkpoint in qtp?

0 Answers  


Which property do you use to retrieve or assign data into a cell in a Data Table object?

1 Answers  






what are the disadvantages of descriptiveprograming

5 Answers   GE,


Where we write the FUNCTIONS, in Expert view (or) in any textfiles like Notepad and save it in Library functions folder? How to cal that functions to our script? How to save that functions to Function generator?

3 Answers  


What is the entry and exit point of automation testing

2 Answers   Infosys,


How to differentiate the webedit field like user name and password? Please tell any other best answer is ther

3 Answers   Navis,


Using Regular expression method some particular value is not present in given value. HOow do use regular expression? Forexample password all number,character ,special character are accepted but (_',)underscore,comma are not used. How do write regular expression.

1 Answers  


hi,i have a pblm in qtp,im testing an webappl in which different types of error pop up messages are displayed which qtp is not differentiating or it is not recognising. how do i make it recognise different popup errorm messages while writing script?

4 Answers  


What are the types of object repositories? Which one is you are using?

0 Answers  


Categories