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




requirement is for combo box your expected value is str= "Denver.Frankfurt.London.Los Ang..

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

More QTP Interview Questions

There is an excel file of 1 to 100 sheets how you will iterate through it?

0 Answers  


How does QTP identifies the object in the application?

1 Answers   Crea,


How to start recording using quicktest professional (qtp)?

0 Answers  


Hello Friends, I am working with QTP 9.2 descriptive programming. Can you please let me know how to work with below. Browser is IE, for my site, it opens another page with different browser name, For example Parent Page is google.com and child page is inteview questions. How to work with this second page.

3 Answers  


After creating testcases, how do you start testing in QTP? what methodology will follow?

7 Answers   Actran, American Well,






Where can I find and view run-time data table?

0 Answers  


what is framework in QTP? any one give me answer

4 Answers   Wipro,


Hi Small doubt . i am working as Contract employee in XYZ comany thrw ABC Consultancy. so. How i write my resume ? In Professional experience Column. plz send urgent

2 Answers  


abt filter function if iam using below two statments its ok My = Array ("Apples","Oranges", "Apricots") MyResult = Filter(My, "Oran") if i use msgbox MyResult it shows type mismatch plz help me

2 Answers  


Will QTP Support Visual Foxpro Applications? If yes please tell me whether I need to install any additional addins for that?

0 Answers  


It is given in the help of QTP 9.2 that we cant debug the scripts. Is there any other way to VIEW, PAUSE and make modifications in the scripts during execution???

0 Answers  


While recording a login window QTP is identifying only parent window,then how can u identify the child objects.

2 Answers   Symphony,


Categories