1)How to test whether items in a weblist are in alphabetical
order or not?

Answer Posted / vikas choubey

For i=0 to Ubound(arrCtry)
If arrCtry(i)<>"--Choose One--" Then
objArray.Add(arrCtry(i))
End If
Next

objArray.Sort()

objArray.Insert 0,"--Choose One--"

For j=0 to Ubound(arrCtry)
strOuput=strOuput+objArray(j)
strOuput=strOuput+";"
Next


If
strOuput=Browser("name:=QTP").Page("title:=QTP").WebList("name:=select1").GetROProperty("all
items")+";" Then
Msgbox "The Weblist's values are sorted in alphabetical order"
Else
Msgbox "The Weblist's values are not sorted in alphabetical
order"
End If

Is This Answer Correct ?    1 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Hi, Can anyone please send me vb script examples to practice vb and also material to learn vb scripting in QTP? my email id : hareen_11@yahoo.com

1828


What is loose binding? Why is it not a good practice to use it?

639


What is Procedure or Subroutine in VB Script?

608


wat is the com(common object model)object for mozilla firefox???????plz if any one know the exact answer....reply me......

1505


Explain the tristate constants in vbscript?

567






how does vb script help in web page designing? explain with example.

1592


How many types of procedures are available in the vbscript language?

540


1) How can we use VB script in testing the application? 2) What all are the things(Software application to be installed in PC) we need to learn VBscript?

3559


Explain about .wsf files?

630


I have attended Anovatek Software QTP interview. They will give us computer and one web based application with QTP. We have to automate some records (already updated records or new records) using QTP Data driven testing. But we should use for loop? Can any one know how to do data driven testing using For loop?

1557


Explain about tristate constants?

592


How will you get a subset of a array in vbscript?

593


Which keyword is used to declare a variable in the vbscript language?

539


how to operate webobjects in a webpage using getobject function and then using generic methods?

2549


Hi Friends my Question is very simple,in Manual testing when we click on a hyper link it directs us to the relavent page or it re-directs us to the current page,so there we can easily write testcase but same thing if we do in automation script using QTP & need to generate report using Reporter.report event how we will do it?thanks in advance...

1660