Description : These functions are used
to invoke any other QEngine script / Desktop script inside another
QEngine script.
Where the Invoke Script Functions can
be used
?
Following is the scenario where
Invoke Script Function can be used,
- To execute any of the bat/sh script inside the QEngine script to
start an application.
- To call another QEngine script to handle any error scenario.
- To call another QEngine script which will do a part of
application playback.
How to insert the Invoke Script
Functions in
the script ?
- Click the "Insert Built-in Function" link available above the
script editor
- In the "Built-in-Function" window, select the "General Functions"
in the "Category" combo.
- Select the appropriate function to be used in the "Functions"
combo.
- Configure the values for function arguments and click on "Paste"
button to add the function to the script.
Following are the various functions used to invoke other scripts:
callScript
Function
Description:
Invoke another web script from the one
currently being executed.
For more details refer "Chaining the Scripts".
How
to Define:
callScript("Web Script
Name","Web Script Path")
Mandatory Parameters:
WebScriptName = Script name to be called.
WebScriptPath = Script path (relative to
the web scripts directory).
Example:
callScript("test","case1/test")
Return Values:
Whether script execution successfully
completed or not
Top
callScriptUpto
Function
Description:
Invoke another web script from the one
currently being executed.
Execute up to the line number specifed
For more details refer "Chaining the Scripts".
How
to Define:
callScriptUpto("Web Script Name","Web Script Path",
Line number)
Example:
callScriptUpto("test","case1/test",75)
Return Values:
Whether script execution successfully
completed or not.
Top
callScriptFrom
Function
Description:
Invoke another web script from the one
currently being executed.
Execute from the line number specifed
For more details refer "Chaining the Scripts".
How
to Define:
callScriptFrom("Web Script Name","Web Script Path",
Line number)
Example:
callScriptFrom("test","case1/test",75)
Return Values:
Whether script execution successfully
completed or not.
Top
invokeApplication
Function
Description:
Invoke any application (.exe, .bat etc)
running in the system.
Current script execution will be
suspended till the called Application is executed completely.
How
to Define:
invokeApplication("Command line")
Example:
invokeApplication("C:\Mozilla\Mozilla.exe")
Return Values:
Status String
Top
invokeApplicationInThread
Function
Description:
Invoke any application (.exe, .bat etc)
running in the system.
Called Application will be started on new
thread. Calling script's execution will continue
How
to Define:
invokeApplicationInThread("Command line")
Example:
invokeApplicationInThread("C:\Mozilla\Mozilla.exe")
Return Values:
Status String
Top
invokeApplicationWithArgs
Function
Description:
To invoke any application (.exe, .bat
etc) running in the system with arguments to be passed (if any).
Current script execution will be
suspended till the called Application is executed completely.
How
to Define:
invokeApplicationWithArgs("<fileName>","<arguments>")
Note:
Use forward slash for all path separators in your command. Also, when
specifying multiple arguments, separate the arguments with space.
Example:
invokeApplicationWithArgs("C:\Mozilla\Mozilla.exe","-P
default http://www.google.com")
Return Values:
0 for Success
1 for Failure
Top
invokeApplicationInThreadWithArgs
Function
Description:
To invoke any application (.exe, .bat
etc) running in the system with arguments to be passed (if any).
Called Application will be started on new
thread. Calling script's execution will continue.
How
to Define:
invokeApplicationInThreadWithArgs("<fileName>","<arguments>")
Note:
Use forward slash for all path separators in your command. Also, when
specifying multiple arguments, separate the arguments with space.
Example:
invokeApplicationInThreadWithArgs("C:\Mozilla\Mozilla.exe","-P
default http://www.google.com")
Return Values:
0 for Success
1 for Failure
Top