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
invokeapplication "C:\Program Files\Mercury
Interactive\QuickTest
Professional\samples\flight\app\flight4a.exe"
dialog("Login").WinEdit("Agent Name:").Set "baba"
Dialog("Login").WinEdit("Password:").SetSecure
"489ff6345f83ebb85f1f91f6e86ee1c1f7a8307c"
dialog("Login").WinButton("OK").Click
msgbox now
window("Flight Reservation").WinEdit("Date of Flight:").Set
"09/09/09"
'''''''''''''''''''''''''''' Fly From
'''''''''''''''''''''''''''
expval="London"
i=window("Flight Reservation").WinComboBox("Fly
From:").GetItemsCount
msgbox i
y=window("Flight Reservation").WinComboBox("Fly
From:").GetContent
msgbox y
For j=0 to i-1
x=window("Flight Reservation").WinComboBox("Fly
From:").GetItem(j)
datatable.SetCurrentRow(j+1)
print x
datatable("Fly_From",1)=window("Flight
Reservation").WinComboBox("Fly From:").GetItem(j)
If (expval=x) Then
window("Flight Reservation").WinComboBox("Fly
From:").Select(j)
End If
Next
''''''''''''''''''''''''''''''' Fly To
''''''''''''''''''''''''''''''
expval1="London"
k=window("Flight Reservation").WinComboBox("Fly
To:").GetItemsCount
msgbox k
l=window("Flight Reservation").WinComboBox("Fly To:").GetContent
msgbox l
For m=0 to k-1
datatable.SetCurrentRow(m+1)
n=window("Flight Reservation").WinComboBox("Fly
To:").GetItem(m)
print n
datatable("Fly_To",1)=Window("Flight
Reservation").WinComboBox("Fly To:").GetItem(m)
If (exp1=n) Then
window("Flight Reservation").WinComboBox("Fly To:").Select(m)
else
reporter.ReportEvent micPass, "Validation is
correct","London is not matching in Fly To: field"
End If
Next
| Is This Answer Correct ? | 1 Yes | 1 No |
in qtp how i can retrive from a browser how many links are there.means total no of links used in a browser
What is the main difference between desriptive programming and generic functions
how to add a runtime parameter to a data sheet?
how to count spaces in a given string ex: "this is jagadeesh" in QTP with simple functional script
what is purpose of automation?
How to Synchronize the Browser at Field level? For example if you put Browser.sync(), it will wait upto for that Browser sync only. But It should wait upto total Browser get uploaded with all fields. Note : We don't know Which fields will come in that Browser. Means without knowing field names.
Hello friends..... On which areas of an application we can not test with QTP
0 Answers Thatavarti Technologies,
How to handle the exceptions using recovery scenario manager In QTP?
HI, pls help me on this, iam not able to capture getcelldata value in javatable... msgbox javawindow("").javatable("").getcelldata(3,3) but it diaplays empty...
i have a window , initial its name is "NEW CUSTOMER" i have to enter the details of customer in the test object fields and after saving the window name is automatically changing with the customer name . so how to identify that window after saving. (i am using descriptive programming.)
How to Test the mainframe application?(tell me few basic things)
Did you find anything in your project that QTP proved inefficient to perform?