Monday, 10 March 2014

QTP Environment Variables

----------------------------------------------------------------------------------------------------------- SystemUtil.Run "C:\Program ... thumbnail 1 summary

-----------------------------------------------------------------------------------------------------------

SystemUtil.Run "C:\Program Files\HP\QuickTest Professional\samples\flight\app\flight4a.exe"

SystemUtil.Run Environment("url")

Dialog("Login").Activate
Dialog("Login").WinEdit("Agent Name:").Set Environment("uname")
Dialog("Login").WinEdit("Password:").SetSecure Environment("pwd")

wait(2)
Dialog("Login").WinButton("OK").Click

Window("Flight Reservation").Activate

Window("Flight Reservation").Close


-----------------------------------------------------------------------------------------------------------
Msgbox Environment("OS")
Msgbox Environment("ProductDir")

x= Environment("ProductDir") : y="\samples\flight\app\flight4a.exe"
SystemUtil.Run x & y

----------------------------------------------------------------------------------------------------------

SystemUtil.Run Environment("AppPath")
Dialog("Login").Activate
Dialog("Login").WinEdit("Agent Name:").Set Environment("Agent")
Dialog("Login").WinEdit("Password:").Set Environment("Password")
Wait 2
Dialog("Login").WinButton("OK").Click
----------------------------------------------------------------------------------------------------------

Environment.LoadFromFile "abcd.xml"
SystemUtil.Run Environment("AppPath")
Dialog("Login").Activate
Dialog("Login").WinEdit("Agent Name:").Set Environment("Agent")
Dialog("Login").WinEdit("Password:").Set Environment("Password")
Wait 2
Dialog("Login").WinButton("OK").Click

No comments

Post a Comment