Avoid ‘Element Not Found’ errors
  • 25 May 2021
  • 1 Minute to read
  • Contributors
  • Dark
    Light
  • PDF

Avoid ‘Element Not Found’ errors

  • Dark
    Light
  • PDF

One of the most common errors agents report in the Agent Builder is Element Not Found. In the Web Console, the same issue is reported as An item could not be found on the page.

You can often resolve this by adding providing the agent an alternate location for the element, but in some cases, the error is reported because the targeted element just doesn't exist. For example, this can happen if you configured an agent to collect category names and their subcategories, but one of the categories does not contain any subcategories.

To avoid this error and allow your agent to continue running:

  1. Right-click the action associated with the item that wasn’t found.
    Handling Not Found Errors_Image1

  2. Select Properties > Error Handling.
    Handling Not Found Errors_Image2(1)

  3. Select the page you want to re-direct the agent to when the specified element is not found.
    Unless you already have a page set up for error handling, you will generally choose New Page so you can create a dedicated error-handling page to document errors or automate other actions.

Handling Not Found Errors_Image3(1)

  1. Select SAVE.
    You'll see an icon that indicates which page the action redirects to if the action’s target item isn’t found.

Handling Not Found Errors_Image4(1)

Optional error handling

You can make the error handling functionality optional. This is advised when you know that the data point you are trying to capture is not consistently in the same place or exists for some items but not others. For example, if some items on a page have discount prices and others don't, you want to make sure the discount price is optional. Additionally, you can use other preventative measures, like changing the location, to ensure that the agent has other options besides only erroring.


Was this article helpful?