- 25 May 2022
- 1 Minute to read
- Contributors
- Print
- DarkLight
What to do when the target element isn't displayed/visible
- Updated on 25 May 2022
- 1 Minute to read
- Contributors
- Print
- DarkLight
This is a troubleshooting guide for "Element not found" errors where the target element was not displayed in the screenshot.
On this page, you'll learn the most common causes and solutions.
Common causes and solutions
1. Missing hover step
Cause
The most common cause is that the test scenario doesn't have a hover step that displays the target element.
For example, in the below screenshot, you need to add a hover step on the "Resources" menu item to make the "Guides" and other pop-up list items appear.
Solution
See Hover Step (Autify University) to learn how to add a hover step.
Note that you need to add a hover step on the element that triggers rendering, not on the one you want to display.
2. Error in previous steps
Cause
You may find the screenshot of the failed step shows a different page or content than what you expected.
In this case, there may be unexpected errors in previous steps. Most commonly, this is an unexpected validation error within a form.
For example, in the below screenshot, you need to input a valid e-mail address to navigate to the next page that shows a thank-you message.
The assertion on the thank-you message will fail with an "Element not found" error if you input an invalid value into the form.
Solution
To troubleshoot, check the screenshots of the preceding steps.
In the above example, the error was caused by the preceding input step. While the input step was successful, the argument (input value) of the step was not a valid e-mail address.
If you are still having trouble...
Contact our Customer Success team anytime. We will help you solve this issue. 🙂