- Print
- DarkLight
- PDF
Avoid ‘Element Not Found’ errors
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:
Right-click the action associated with the item that wasn’t found.
Select Properties > Error Handling.
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.
- Select SAVE.
You'll see an icon that indicates which page the action redirects to if the action’s target item isn’t found.
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.