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

What is positive test case and Negative Test case? What is the meaning of Real World Scenario's?

2 Answers   TCS,


What the differences are and best practical application of Object Repository?

0 Answers  


Which advantages helping QTP to hold the position of "Market Leader" for such a long period?

0 Answers  


How to retrieve particular cell data in excel sheet ?without importing method.

3 Answers  


what is verification & validation?

2 Answers   Accenture,






How will you handle the situation when object is not captured during record?

12 Answers   AZTEC,


What criteria do you use when determining when to automate a test or leave it manual?

2 Answers  


Can we put more than one action in a single script???? yes or no.....

2 Answers   BirlaSoft,


one page contain next button.when we enter that its not going to next page.what type of error that one.

3 Answers   TCS,


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  


what is syncurnisation point? what is the use of this in real time environment? plz explain?

6 Answers   AppLabs,


in flight reservation application. when i entered flyto combobox as london. and i have to check this london is present in flyfrom combobox.give me the code with good explanation. extention to this question. at each iteration i have to put(WRITE) the fly from and fly to city in database table

1 Answers  


Categories