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

What is synchronization? What are the ways you can synchronize?

653


what are the utilities and drivers

1847


X flies from Hyd to bangalore using different methods of transportation. write the test scenarios and test cases for this?

1509


How to add synchronisation points in qtp?

580


How to test login module with different username and password by using data driven testing in QTP?

612






How do I lauch my test website using code from qtp in different environmet, uat and PPTE?

1463


1. What is the difference between Keyword and function in the keyword driven framework? 2. How do you associate Keywords to the script ?

991


How to break the object spy ?

664


What is the use of text output value in quicktest professional (qtp)?

602


if our qtp vb Script may be Currepted then What we want do?

1489


What is recovery scenario in qtp?

587


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

621


Can any body please tell me the steps of keyword driven framework of QTP.

1570


what the difference between shared repository and per action repository?

550


Brief the process of testing with UFT?

638