Interview Questions   Tutorials   Discussions   Programs   Videos   

QTP - How to write scripts in QTP?




349
views
asked marvit August 22, 2014 09:50 AM  

How to write scripts in QTP?


           

1 Answers



 
answered By Dharma   0  
Script  - "LoginLogout" the Flight application
Username and Password are parameterized through DataTable

Dim uname, pwd
uname=DataTable.Value("username","Global")
pwd=DataTable.Value("password","Global")
SystemUtil.Run "C:\Program Files\Mercury Interactive\QuickTest Professional\samples\flight\app\flight4a.exe"
Dialog("LoginDialog").WinEdit("AgentNameEdit").Set(uname)
Dialog("LoginDialog").WinEdit ("PasswordEdit").SetSecure Crypt.Encrypt(pwd)
Dialog("LoginDialog").WinButton("OKBtn").Click
Window("FlightReservationWin").WinMenu("Menu").Select "File;Exit"

flag   
   add comment

Your answer

Join with account you already have

FF

Preview


Ready to start your tutorial with us? That's great! Send us an email and we will get back to you as soon as possible!

Alert