Print Page | Close Window

5 Ways to call an external file in QTP

Printed From: One Stop Testing
Category: Testing Tools @ OneStopTesting
Forum Name: QuickTest Pro @ OneStopTesting
Forum Discription: QuickTest Pro is a fresh approach to automated software and application testing that addresses testing needs of both business analysts and Quality Assurance professionals.
URL: http://forum.onestoptesting.com/forum_posts.asp?TID=7284
Printed Date: 01Jan2025 at 9:50pm


Topic: 5 Ways to call an external file in QTP
Posted By: Mithi25
Subject: 5 Ways to call an external file in QTP
Date Posted: 05Nov2009 at 12:44am

[Method 1]: the use of "SystemUtil.Run" command to support any file format called For example: SystemUtil.Run "C: testfile.txt"
[Method 2]: Use "InvokeApplication" command (invoke the executable program) Call executable applications such as: InvokeApplication "C: Program Files Plus! Microsoft Internet IEXPLORE.EXE"
[Method 3]: The "Excutefile" function calls the external file has three kinds of file formats can be called, and they are *. sql; *. vbs; *. txt suffix three kinds of documents such as: ExecuteFile "C: TEST.VBS"
Note: ExecuteFile function Although it can be used to import an external file into the QTP script, but can not be shared between the various ACTION. If you want it to be shared between the various ACTION external file, please refer to the following cases
[Method 4]: in [resources] option is called an external file in the "resource" option, there are three kinds of file formats which can be called, and they are *. sql; *. vbs; *. txt files of three suffix . Test → Settings → Resources → + Resources by adding an external file, you can in a QTP script to be shared between all of the external file ACTION

Note: This method can be directly implemented in different ACTION shared by an external file called

[Methods 5]: Dim WshShell set WshShell = CreateObject ( "Wscript.Shell") WshShell.Exec "calc.exe

-------------
http://www.quick2sms.com - Send Unlimited FREE SMS to Any Mobile Anywhere in INDIA,
Click Here



Print Page | Close Window