Skip to main content

Fail Command

Fail command is used to fail an agent if the condition is true.

The ‘Fail’ command is located under the ‘Other’ icon in the command palette (refer the below snapshot)

image-20241022-064505.png

In order to make the optimum use of the ‘Fail’ command, we can configure this command by applying transformations. Based on the selection of the XPath, the Retry command accepts conditions.

image-20241022-064627.png

Example,

If the condition satisfies, we need to enter the name of the retry command, else we need to return an empty string.

image-20241022-064726.png

Under the ‘Fail’ command, we can configure the options as shown in the below screenshot, as per user requirement.

image-20241022-064839.png

Command Properties

On the Options tab of the command, we have two options:

  1. General Settings

  2. Fail

image-20241022-064917.png

General Settings → General Command Settings

The ‘General command settings’ section is designed for user customization to give the command a desired name, comment to describe in brief about the usability or requirement for the command and the disabled option to not execute this command at all.

image-20241022-064951.png
  1. Command name: This property specifies the name of the command.

  2. Comments: Provides a field for entering metadata or a brief description regarding the command. These annotations are used internally to provide context for developers or team members. Comments are not part of the exported data and are only used for documentation purposes within the configuration.

  3. Disabled:  This checkbox allows the user to disable the command. When checked, the command is ignored during execution. By default, it is unchecked.

Fail→ Selected failure message

When failure message missing: This dropdown menu lets users define how the agent should behave when the content is not found. The default option is Fail, meaning the agent will stop execution or log an error and proceed to the next sibling command.

image-20241022-065137.png

The available options are:

  • Fail: The agent will stop and return an error, or if there are parallel commands, it will log the error and move to the next parallel command.

  • Warn: The agent logs a warning but continues processing further commands.

  • Ignore: The agent neither logs an error nor a warning, and it skips any child commands, moving to the next parallel command.

  • Passthrough: The agent ignores the error but continues to execute the child commands.

Selected failure message: This shows the content selected by the command on the current page. If no content is selected or a selection is missing on the current page, then it will show the message as “No selected Content”.

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.