If you’re a TestProject user, you’re probably familiar with the TestProject Smart Test Recorder. While using it for basic actions is extremely easy, not everyone is aware of the complexity and depth that can be achieved with it.
From my own experience managing the Solutions Engineer team at TestProject, I encounter a lot of use cases in which people are only familiar with the basic actions the recorder has to offer. That is why in this article we are going to cover advanced capabilities and features which are built into it, that can help you benefit from a more robust automation framework.
At the end, you will gain access to a special cheat sheet. It’s a quick-access resource that you can use before starting to run tests in a project 💡 So, let’s start learning about the actions you can use in the recorder:
⏺ Part 1
Let’s take a look at the recorder:
- Run – Can be used to run all of the steps that have been created so far. Make sure to run your test before executing it outside of the recording session.
- Record – Can be used to toggle ‘on’ or ‘off’ the recording of all basic user actions, such as: click, type, switching tabs, pressing enter, and more.
- Test – Controls all of your test settings, such as: test name, description, execution speed, and more.
- Steps – Manages all of the test steps from a single place. Edit or delete, run specific step, and more.
- Parameters – Creates, deletes, or edits all of the parameters within your test and project.
- Locator – Searches elements, verifies locators using XPath, CSS, and more.
- Explorer – Inspects the page hierarchy & elements, and interacts with them using the element inspector.
- Add step manually – Allows you to create your own step using any action. You can choose a basic action or any complex action from the addons library.
- Add test as a step – Allows you to reuse tests as a step inside the main test. Meaning you can simply use any test that you have created before, as long as the tests are of the same platform and in the same project.
⏺ Part 2
Steps in the test are constructed by different components. They can have less or more, but they all share something in common: an action.
- Add comment – You can add comments to your steps to help you remember their role in your test.
- Action – All steps must have an action they perform. A step can be a single action without anything else.
- Element – When the element is present, it means an element is required to perform the step.
- Output and Input – An input field can sometimes be required and other times optional. An output field is always optional. The input field allows us to pass information into the step that it will use during execution in order to change its result. The output field is used to capture information retrieved by the action. In this example, getting the text from the ‘a’ element into the ‘TestParameter’ variable will store the text retrieved from the element in our parameter, which can be used later in the test.
- Add Validation – Allows us to validate the result of the step and change the outcome if needed. For example, I can add a validation that the text retrieved from the element is equal to “log out”. When a validation fails, it will fail the step even regardless of the step execution result.
- Advanced Options – Allows us to add conditions for executing the step, see the step’s iFrame context, set specific rules that override the test’s settings default, and more.
- Magnifying Glass – When an element is used in a step we can use the magnifying glass to search it on the page, and understand on which element the action is performed.
- Pencil (edit) – The pencil icon allows us to edit the element: name, locators, and locators priority.
⏺ Part 3
Let’s take a look at the Element Inspector’s options:
- Highlight – The element inspector will highlight any element that we hover on with our mouse (tip: hold CTRL to hide the inspector).
- Parent Elements – This can be used for finding a different element than what we selected. Use this view to see all of the parents’ hierarchy of the selected element from the current element up to the main node.
- Freeze / Unfreeze – Use this button to freeze the element and open or close the menu (tip: use Double-Shift to activate).
- Actions – Use this option to see all the actions you can create for the element type you’ve selected.
- Validations – Use this option to see all the validations you can create for the element type you selected.
- Attributes – Can be used to see all the elements’ attributes, including other information such as XPath, text, and more (tip: can be used to create locators by using specific attributes).
- Save Element – You can save the element while recording and use it later in your test, when creating a step manually, or for other purposes.
Test Recorder Cheat Sheet
In this section, I will share a cheat sheet for the recorder’s actions that have been explored throughout this article, and even more that weren’t mentioned (such as AI tools). It’s a quick-access resource that you can use every day before starting to run tests in a project. Enjoy & happy testing!
is it possible to run the test recorder offline when testproject.io is shut down by next March ?