Troubleshooting failed tests
Find out why a test failed and make it reliable across runs.
Read the step error first
Open the run in history. The failed step shows its error message, and the run includes screenshots of the page. Add a Capture Screenshot step before a step that fails to see the page at that moment.
Every run starts with a fresh browser
Each test run opens a new browser session and closes it at the end. Cookies, local storage and sign-in state are not carried over from earlier runs or from other tests in the suite.
A test that needs a signed-in user must sign in within its own steps.
Element not found
The selector did not match within the Element Timeout. Common causes:
- The selector depends on generated class names or position. See Selectors
- The element loads after a delay longer than the Element Timeout. Add a Wait for element present step with a longer timeout
- The element is inside an embedded frame. Steps act on the main page only
Click target is covered
A click fails when another element, such as a cookie banner or a modal, covers the target. The error names the covering element. Dismiss it in an earlier step, using a step condition if it does not always appear.
Timing
Prefer waits that end as soon as the page is ready over fixed pauses. A pause is either too short on a slow run or wastes time on a fast one.
- Wait for element present: waits up to the given milliseconds for an element to appear
- Wait for element is not present: waits for a spinner or dialog to disappear
- Pause (time in ms): use only when nothing on the page signals that it is ready
Data dependencies
A test that expects data created by another test, or left over from an earlier run, fails when that data changes. Create the data the test needs in its own steps, with the UI or a request step, and use unique values so repeated runs do not collide.
Use dedicated test accounts
Run tests with accounts created for testing, not real user accounts. Store the credentials as variables, and tick Make this value private on the Assign step that types the password so it is masked in results.
Give tests that change account state their own account so they cannot affect each other.
Optional steps
Tick Make this step optional (Continue on failure) on steps that may fail without making the test wrong, such as closing a banner that only appears sometimes. A failed optional step does not stop the test or fail it.
Do not mark the checks that prove the feature works as optional. A step condition is often clearer, because it skips the step on purpose instead of hiding a failure.