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



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

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

More VB Script Interview Questions

how to increase the values in text box in a given text box increament by two values by clicking on button

0 Answers  


Plzzzzzzz can any one tell me which is the best institute in hyderabad for learing VBScript. plz do answer guys its urgent plzzzzzzz. thanks in advance.

0 Answers  


How to write Descriptive programming in .VBS file i wrote this code but it is giving error.. Dim qtApp set qtApp=createobject("QuickTest.Application") qtApp.Launch qtApp.Visible=True Set objIE = CreateObject("InternetExplorer.Application") objIE.visible = True objIE.Navigate "www.gmail.com" browser("title:=gmail").title("title:=gmail")

2 Answers  


Why to use option explicit in vb script?

0 Answers  


Dear All, I am geting below IE error whilie executing the QTP scripts in Batch mode "Internet Explorer has encountered a problem and needs to close. We are sorry for the inconvenience." can any one suggest me how to resolve this issue . Thanks Balaji

0 Answers  






Explain about tristate constants?

0 Answers  


i have to open a notepad having no. of words in dat file by recording in qtp and then find a particular word and display true or false

0 Answers  


what is the use of Data base check point ?

3 Answers  


When does ‘on click of button’ event gets triggered in the vbscript language?

0 Answers  


Which in-built function related to an array joins substrings into one string in the vbscript language?

0 Answers  


Difference between dim,public and private variables in vb script?

0 Answers  


what is test scenario?

1 Answers  


Categories