Documente Academic
Documente Profesional
Documente Cultură
1) SystemUtil.Run
Parameters - If the specified FileName is an executable file, use the Parameters argument to
specify any parameters to be passed to the application.
Operation - The action to be performed. If this argument is blank (""), the open operation is
performed.
The following operations can be specified for the operation argument of the SystemUtil.Run
method:
open - Opens the file specified by the FileName parameter. The file can be an executable file, a
document file, or a folder. Non-executable files are open in the associated application.
edit - Launches an editor and opens the document for editing. If the FileName argument does not
specify an editable document file, the statement fails.
print - Prints the document file specified by the FileName argument. If the specified file is not a
printable document file, the statement fails.
2) InvokeApplication
This command is now mainly used for the backward compatability ie to use with the lower
versions(below QTP 6.0) of QTP.
Example:
Dim oShellSet oShell = CreateObject ("Wscript.shell")'
Example:
Dialog("Run").WinEdit("Open:").Type "c:\WINNT\system32\notepad.exe"
Dialog("Run").WinButton("OK").Click