Software Testing Social Network

Free Software Testing Tutorial and Quality Assurance Portal

Home Blog navigation 5 Ways to call an external file in QTP

Welcome to SQAT Blogs!


Sep 30
2009

5 Ways to call an external file in QTP

Posted by: QTPExpert in Testing Tools Blogs

Tagged in: Untagged 

QTPExpert

[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"


Attention! For US visitors deep discounted electronics products available! CLICK HERE to check it out.
Comments (0)Add Comment

Write comment
You must be logged in to post a comment. Please register if you do not have an account yet.

busy