Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
what is productdir in this script
#1
Solved: 11 Years, 3 Months, 3 Weeks ago
Code:
1) ApplicationDir = Environment("ProductDir")
2) ApplicationPath = "\samples\flight\app\flight4a.exe"
3) If Window("Flight Reservation").Exist(2) Then
4) Window("Flight Reservation").Close
5) SystemUtil.Run ApplicationDir & ApplicationPath
6) Elseif Not Dialog("Login").Exist(1) Then
7) SystemUtil.Run ApplicationDir & ApplicationPath
8) End If
9) Dialog("Login").WinEdit("Agent Name:").Set Datatable.Value
("AgentName",dtGlobalSheet)
10)Dialog("Login").WinEdit("Password:").Set Datatable.Value
("Password",dtGlobalSheet)
11)Dialog("Login").WinButton("OK").Click
12)If Dialog("Login").Dialog("Flight Reservations").Exist(1) and
Datatable.Value ("Status",dtGlobalSheet)="Fail" Then
13)Dialog("Login").Dialog("Flight Reservations").Static("Agent name must
be at").Check CheckPoint("Agent name must be at least 4 characters
long.")
14)Dialog("Login").Dialog("Flight Reservations").WinButton("OK").Click
15)Elseif Window("Flight Reservation").Exist(10) and Datatable.Value
("Status",dtGlobalSheet)="Pass" Then
16)Reporter.ReportEvent PASS,"Login: ","Succeeded"
17)Else
18)Reporter.ReportEvent Fail,"Login: ","Combination #" &
Datatable.GetCurrentRow & " was not according to Excel file"
19)End If
Reply
#2
Solved: 11 Years, 3 Months, 3 Weeks ago
Hi,

It is the installation directory of QTP
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)