Creating a Test using TestProject Recorder is extremely easy, however, from time to time we might encounter an issue that we need to debug, in this article we are going to cover basic debugging strategies and tips to speed up your work in the Recorder.

Use the recorder effectively

Running specific steps

To debug our tests efficiently sometimes we will need to execute a test to the point the test failed. this is how we can do it in the recorder:

1) Run from/until here:

We can execute all the steps until 5, or all steps from 5 to the end by clicking on the step context menu:

2) Select specific steps:

We can execute all the steps selected by hovering on the left side of any step and selecting it.

we can also hold "SHIFT" to multiple select all the steps from 1 point to another

Make sure you are locators are working

TestProject automatically creates elements with working locators at the time of record.

Sometimes elements are changing from recording to execution, this is how you can check your locators and create new ones if needed:

1) Use the magnifying glass -

Go into the step and use the magnifying glass to locate the Element on the page

If the element is not detected, go into Edit Element using the pencil sign:

and now check the other locators:

To change the priority of the locator use the arrow and move the wanted locator to the top. if there is an unnecessary locator use the X and remove it.

If you are want to change the way TestProject record new elements click here.

Use Step execution details to debug your tests

You can find more information about Step execution details here.

This window helps to understand which activities lead to the step failing, and it's very important for debugging your tests.

Using Switch to window correctly

The Recorder automatically creates "switch to window" steps for you, however, it's important to know how to create and manage them. as sometimes you will need to add them manually. For moving between tabs please use a specific index if you want to verify you are on the correct window you can check the URL or use any other method but if you are running the same flow switching to a specific window should be the same.

image

Note that the index starts at 0 (first tab)

Use dynamic Scrolls / Swipes

When you swipe or scroll down in your application the recorder by default creates a fixed scroll for you, however when running the test on a different browser/resolution the test might behave differently. this is why you should always implement dynamic scrolls/swipes when possible, follow this article to learn more.

General fixes

Fixing Automation Flakiness issues

TestProject has a lot of AI tools built into it to stabilize your test, but it's important to know how to use them. You can enable/disable AI tools from the Test Setting or even increase effectiveness. Please follow this article if you running into stability or flakiness issues.

Did this answer your question?