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

What are the recording modes in qtp?

579


How to get the format of a webedit class in qtp. How can i know that particular webedit accept what type of format like "mm/dd/yyyy" or "$" or Alphanumeric

1638


Name the properties you would use for identifying a browser and page when using descriptive programming?

520


How to use reporter.report event in qtp ?

549


how to evalute defects in QTP script?

1482






hi i want license key for qtp 9.2 pls its adjust product name : quick test professional locking code :8 - 54A6A license type : seat license maintenance number : 88888888-8888 pls send license key to my email id borusu.ramkumar@gmail.com

3699


What are metrics and matrix?

1361


what kind of frame work you used in your last project?

1811


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

592


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)

2800


Describe how Smart Identification is used

1689


Client is able to provide budget..he want you to choose the automation tool for the web application? which one you will select ? QTP or Selenium ? what are the reasons?

1226


Have you done batch testing in qtp? If yes how you are doing?

501


What is the short cut keys for the following?

638


What is 'sleep' in sync point?

615