Tuesday, July 26, 2011

Call User defined Function in QTP

for Technical interviews:

http://no1tutorial.com/

learn step by step technologies:


http://no1tutorial.com/

Public Function Login (Agent,Password)
SystemUtil.Run "C:\Program Files\HP\QuickTest Professional\samples\flight\app\flight4a.exe","","C:\Program Files\HP\QuickTest Professional\samples\flight\app\","open"
Dialog("Login").WinEdit("Agent Name:").Set (Agent)
Dialog("Login").WinEdit("Password:").Set (Password)
Dialog("Login").WinButton("OK").Click
End Function

Develope this function in Notepad and save with ext. .vbs. after that Setting->Resources-> Add this finction.

and call into the test..

Login "Skhan", "Mercury"

Thanks,
Shahadat Khan

No comments:

Post a Comment