Your test may fail because a bug has been found, that's a good failure, your test has detected a bug in the system!
Other reasons may be caused by the way the test was created.
So let's go over the different reasons and see how to identify and fix the failure.

What to do when the test fails?

  1. Go to the failing step and identify the error message. 
  2. Look at a screenshot taken during the run and compare it to the baseline.
  3. In most cases, you can figure out what the problem was from the side-by-side UI comparison. Sometimes you can go back a few steps to identify the cause.
  4. If you suspect this is a bug, run the test manually and see if it is reproduced.
  5. Check the test logs. It can provide more information about the problem.

We summarized below the most common errors and the recommended actions you should take to handle them.

If you still can not figure out what's wrong, please contact us using the chat box and we'll help you figure out what's wrong.

1. "Element not visible"

What does it mean?
The element exists on the page but is not visible in it:

  • The element currently not in the view port. Check if the resolution you recorded is the same as the one you are running.
  • The element visibility is hidden or set to be: "display: none".
  • The size (height or width) of one element in your test equals to 0.
  • There is an overlay with a high z-index which is placed above the element.

What can I do?

  • Follow the first paragraph "What to do when the test fails?", check if your element is visible or not and identify if it's a bug in your system.
  • If the element does not appear in the view port, you may need to add a scroll step to reach it.
  • Sometimes elements only become visible when the mouse hovers over another element (e.g. a drop-down menu). As hover steps are not recorded automatically, you may need to record one to make your element visible. See hover step for more details on how to do this.
  • Turn off "element must be visible" checkbox in the step's properties. Sometimes you will find that the visibility validation is not required for your business logic, in which case you can turn it off.. If there are overlays in the system, it can be a good solution.

Check out the below videos to see how to troubleshoot these kind of issues


________________________________________________________________

2. "Element not found"

What does it mean?
Testim couldn't detect the element on the page.

What can I do?

  • Follow the first paragraph "What to do when the test fails?", check if you can see the element on the page or not and identify if it's a bug in your system.
  • Identify which step did not work in the test.

This failure can be the result of many different scenarios, here are some examples and ways of solving them:

  • Check if the previous step did not navigate to the page.
  • If the previous step was a form submit, check for an error message after submitting. 
  • If the page didn't finish loading - Add a wait step.
  • If the test runs too fast for the backend code to be reloaded and the navigation failed - try to add "wait for an element" or custom wait.  
  • If you can see the element but it is not recognized, try reassigning the element.

Check out the below videos to see how to troubleshoot these kind of issues


________________________________________________________________

3. "Tab not found"

What does it mean?

  • Testim could not find the correct tab for the step to play on.
  • If your test is a multi-tab test, then one of the test's steps will open a new tab. Since the browser detects the opening of the tab as an automatic pop-up, it will automatically block it as a security measure - in this case, you will need to manually approve pop-ups for this domain (but you will only need to do this once).

What can I do?

  • If you see a red warning near your browser's navigation bar, click it and allow pop-ups for that site.
  • If the first option is not available you can access your browser's advanced settings and update your pop-up settings.
  • Check the previous step result as explained in the first paragraph "What to do when the test fails?".  A form submission might have resulted in errors.

________________________________________________________________

4. "Frame not found"

What does it mean?
Testim could not find the correct frame for the step to play on.

What can I do?

  • Follow the first paragraph "What to do when the test fails?", compare the screenshot, see if something went wrong along the way and identify if it's a bug in the AUT.
  • Inspect the saved screenshot/DOM to validate whether the frame was loaded
  • Your application code might have changed and the recorded iframe no longer exists, in which case you can reassign the target element of the step.

________________________________________________________________

5. JavaScript errors 

What does it mean?
An error occurred while evaluating a JavaScript step or expression (e.g. custom validation or custom action).

What can I do?

  •  "Syntax error" - Incorrect JavaScript syntax. The error can be due to code in a custom step or code in a JavaScript parameter. (you can debug your code in the chrome dev tools)
  • "Assertion failed" - A custom validation step returned false. You can replace this message with a more informative error. See here for more details. 

________________________________________________________________

6. Could not get browser

What does it mean?
There is no browser available in the grid, all the browsers in the grid are in use.

What can I do?

  • Check if your grid contains the browser you tried to run on.
  • If you are using the parallel parameter in the CLI, make sure it's not larger than the number of available browsers in your grid
  • Check out how many runs were sent at the same time or if their run time overlaps. 
  • Add more browsers to your grid. 
  • If none of your tests could run, then there might be a problem with the grid settings, in which case you can contact your grid provider for additional help.

________________________________________________________________

7. Browser type is not supported

What does it mean?
The browser you requested to run on is not supported on your grid or the mode does not match the browser.

What can I do?

  • Make sure the browser exists on your grid. If it doesn't, you can contact your grid provider for additional help
  • IE and Edge browsers need to run in selenium mode, make sure your CLI contains "--mode selenium".  
  • Firefox browser also requires selenium mode if you are not working on the Testim grid.

________________________________________________________________

8. Page is not available

What does it mean?
The application is not available from the location from which it is running.

What can I do?

  • Make sure that the base URL is correct - in the CLI, scheduler, test plan or setup step in the test- according to the method you tried to run.
  • If you're running from a remote grid make sure your application is available from the grid. If it isn't, you can contact us to enable a tunnel.

________________________________________________________________

9. Failed to set text

Setting text in the input text resulted an empty field.

What does it mean?
Set text events can vary between different implementations of an input text field. It may be necessary to use a different event for your app.

What can I do?

  • In the set text step properties, check the "Native Events" check box.

10. Failed to click

The click step passed however the click wasn't actually executed. 

What does it mean?
Click events can vary between different implementations. It might be necessary to use a different event for your app.

What can I do?

  • In the click step properties, check the "Native Events" check box.
Did this answer your question?