How to debug your automation

There are a few ways you can debug your automations with Axiom.ai. We recommend paying close attention to any error messages and following their recommended actions. From the Display a message step to the Add error metadata step, we have a few recommendations to help you debug your automations and get you back on your feet.

When an error occurs, you can learn more by reading about our common errors to better understand them.

# In-builder error messages


If your automation runs into an issue when running, errors and warnings will be displayed within the builder. We recommend reviewing these errors as they contain information that can help you resolve the issue.

error report axiom.ai

# Using the Debugger


When you encounter an error, you will see a "Debug" button in the error message. This opens our debugger feature. The debugger will highlight any steps with issues and provide a recommended action to resolve the error.

screen shot of the axiom.ai debugger

# Run Reports


If you are away from your automation and miss the in-builder error message or wish to re-review them, these will be stored in your run reports. "Run Reports" can be accessed through the dashboard and will give you information on any errors or warnings that were produced by your automation run.

error run report axiom.ai

# Watch the run


A simple but important technique for debugging your browser automation is observing the run. It can take time, so you may wish to screen record your run to play it back and better understand the issue. When watching runs, look out for:

  1. Elements missing from the page.
  2. The order of elements changing.
  3. Loading issues
  4. CAPTCHAs being triggered.

# Use the "Display a message" step


Use the Display a message step to output data. The Display a message step opens a pop-up window in your browser displaying the data inserted into it.

debugging - use the display message step to coutput data in axiom.ai

To display variable content throughout your automation, open the step finder and add a Display a message step to your automation. In the input you can use the "Insert Data" option to insert a variable token from your automation. For example, if you have an output from a Get data from bot's current page step you can use the [scrape-data] variable that it outputs to confirm it is collecting the correct data. This is similar to "print" statements that developers use to output their data throughout their program.

Tip: disable your display a message steps when your automation is production ready

# Use the "Add error metadata" step


Use the Add error metadata step in order to add additional context to your errors. This can be placed before a step that could potentially cause the automation to stop due to an error. For example, if you are passing a variable into an Enter text step, you may wish to include the contents of that variable in the event that the step causes an error, you can see this example built out below:

debugging - use the add error metadata step to add context to your error messages

# Using DevTools


DevTools is a tool that is built into most modern browsers. It is designed to help debug websites and extensions that are installed on the browser. While there are numerous functions built into the tool, the "Console" is the most important when it comes to debugging your automations. The "Console" tab will detail any warnings or errors that have been output from a site, or any extensions that you have installed.

If you are using the "Write Javascript" step, you can use the console.log() functions to output and view information in DevTools, including data tokens within your automation. This can also be used to debug issues with the website itself, which may give you an indication of what could be causing an issue with your automation.

To get started, open DevTools using by right-clicking on the page and clicking "inspect". Navigate to the "console" tab to read about warnings and errors.

You can learn more about DevTools in the Chrome Developer documentation: https://developer.chrome.com/docs/devtools (opens new window).

Note: you will not be able to access Chrome Devtools for cloud runs. You may need to add a "Wait" step to your automation to ensure that the browser does not close before the errors can be accessed.