Execute JavaScript command
Uses Javascript for executing tests, for example to auto-generate a job number for each job run.
Important: This command is available upon request. If interested, contact Perfecto Support.
Parameters
Name | Type | Possible values | Description |
---|---|---|---|
Inline script * |
String |
To perform custom logic execution using JavaScript. This could include but not limited to date/time formatting, manipulation of Strings, perform arithmetic operations, etc. Here are some basic JavaScript syntaxes that can be used in the execute-Js command’s inline Js parameter: Copy
Tip: Avoid using comments (e.g., // todo or /* todo */) in the inline JS parameter.
|
|
Comment |
String |
Adds a comment to the script |
|
On-fail Result* |
Condition |
Ignore | Break | Continue | Abort | Catch |
The behavior when the command fails. |
* Mandatory