requirement is for combo box

your expected value is str= "Denver.Frankfurt.London.Los
Angeles.Paris.Portland.San Francisco.Seattle.Sydney.Zurich"

ar = Window("Flight Reservation").WinComboBox("Fly
From:").GetContent

your actual value is : that shows data in combo box



how can u test the both data is correct or not by using
split function


Answer Posted / reddy prasad

i did like this

invokeapplication "C:\Program Files\Mercury
Interactive\QuickTest
Professional\samples\flight\app\flight4a.exe"
Dialog("Login").Activate
Dialog("Login").WinEdit("Agent Name:").Set "rahju"
Dialog("Login").WinEdit("Password:").SetSecure
"4e885f53fbeeaf29c0e9c986b7a420312f7b66bc"
Dialog("Login").WinButton("OK").Click
Window("Flight Reservation").ActiveX("MaskEdBox").Type
"111111"
str= "Denver.Frankfurt.London.Los Angeles.Paris.Portland.San
Francisco.Seattle.Sydney.Zurich"
msgbox str
x=split(str,".")
msgbox "by spliting the string into substring 0 is : " &
x(0)
msgbox "by spliting the string into substring 1 is : " &
x(1)
msgbox "by spliting the string into substring 2 is : " &
x(2)
msgbox "by spliting the string into substring 3 is : " &
x(3)
msgbox "by spliting the string into substring 4 is : " &
x(4)
msgbox "by spliting the string into substring 5 is : " &
x(5)
msgbox "by spliting the string into substring 6 is : " &
x(6)
msgbox "by spliting the string into substring 7 is : " &
x(7)
msgbox "by spliting the string into substring 8 is : " &
x(8)
msgbox "by spliting the string into substring 9 is : " &
x(9)
Window("Flight Reservation").WinComboBox("Fly From:").Select
"Los Angeles"
ar = Window("Flight Reservation").WinComboBox("Fly
From:").GetContent
'ar = Window("Flight Reservation").WinComboBox("Fly
From:").GetROProperty("text")

str=Array( "Denver","Frankfurt","London","Los
Angeles","Paris","Portland","San
Francisco","Seattle","Sydney","Zurich")
If ar = x(9) Then
msgbox "pass"
else
msgbox "fail"
End If
Window("Flight Reservation").Close


but no result

Is This Answer Correct ?    3 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

PLEASE TELL ME WHEN DO YOU USE THE OBJECT SPY AT RUN TIME

5919


I need Major Help with a Script I recorded in QTP 9.5. I am recording scripts for a Web-based application(s) I have all the URLs for each application in Excel spreadhsheet so that QTP can pull that particular application from the spreadsheet and run it. The problem is QTP isn't recognizing one particular URL so when I hit run in QTP to run this script it opens the internet Explorer but isn't open the URL I have in the Excel spreadsheet. I've retyped the URL and still QTP won't open this Particular one for some reason. The site its self is working fine but for whatever reason QTP won't open it. How do I resolve this? I have a deadline of next Friday the 7th to complete this task so please help me in any way you can. Thanks in advance

1702


How do you synchronization point through DP?

591


breef description of batch testing ?

1701


What is checkpoint in qtp?

543






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

620


how can i pass a "automation script" as a parameter in a function give me need full suggestion thank inadvance

1422


In the application that I'm testing is having a WYSIWIYG editor.QTP is recording editor's body as web element. I want to add some data to this web Element at run time. The problem is that I cant find a method to add contents to this web Element. Can any one come up with an answer for this. Thankx.

1435


Where you get the run time data table?

575


What is TOM in QTP?

1798


if anyone has idea of the interview procedure in covansys, plz send me a mail?

1519


Differences between text and test area checkpoints?

569


Why script error occur in between recording in qtp?

1756


How does QTP identify an object?

605


how do u manipulating INI, DLL and / or registry files in support of your test environment? actually what do u mean by INI and DLL or registry files. plzzz its urgent do answer

1438