<< <%SKIN-STRTRANS-SYNTOC%> >> Navigation: Error Handling > Agent Error Handling |
You can configure an agent to react to errors in two different ways. You can configure the error handling properties for an action command, or you can use a custom script to watch for an error condition and take appropriate action.
You can configure an agent to react to errors in two different ways. You can configure the error handling properties for an action command, or you can use a custom script to watch for an error condition and take appropriate action.
These are the Error Handling properties:
Error Handling |
Description |
Exit Command |
The agent will exit the action command and continue executing the next command. The agent will skip all sub-commands of the action command. |
Retry Command |
The agent will retry the action command a specified number of times, and if the action command does not succeed, it will skip all sub-commands of the action command and continue executing the next command. Set the property Retry Count to specify the number of retries. If Retry Count is set to zero the agent will keep retrying the command indefinitely. |
Restart Agent and Continue |
The agent will restart and continue where it left off. This option is useful if an error puts the website into a state where the agent cannot continue. |
Stop Agent |
The agent will stop. |
No Error Handling |
The agent will not handle the error, but will continue to execute the sub-commands of the action command. Use this option if you want to handle the error in a custom script later in the process. |
You can use Execute Script Commands to implement advanced error handling, such as in these cases.
•A required element is missing from a web page
•An error message is displayed on a web page
•An error occurs during the execution of an action command.
You can write a custom script in C# or VB.NET, or you can use the default script options to generate a default script without writing any .NET code.
This default script retries a parent command
if a selection is missing
An Execute Script Command has a corresponding web selection, and the script can use this web selection to check for any errors. The script also is given the parameter IsParentCommandActionError, which is set to True if the parent action command encounters an error while executing the command action.