Micro Focus QTP (UFT) Forums
what is productdir in this script - Printable Version

+- Micro Focus QTP (UFT) Forums (https://www.learnqtp.com/forums)
+-- Forum: Micro Focus UFT (earlier known as QTP) (https://www.learnqtp.com/forums/Forum-Micro-Focus-UFT-earlier-known-as-QTP)
+--- Forum: UFT / QTP Beginners (https://www.learnqtp.com/forums/Forum-UFT-QTP-Beginners)
+--- Thread: what is productdir in this script (/Thread-what-is-productdir-in-this-script)



what is productdir in this script - vjjohnson04 - 04-18-2011

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



RE: what is productdir in this script - manishbhalshankar - 04-18-2011

Hi,

It is the installation directory of QTP