Update your web tests
Learn how to reorganize test steps, fix selectors, add reusable components, and use variables to update your web tests.
After recording a test, you will often want to reorganize it, fix a selector, or insert new steps. This guide covers the most common modifications.
Interactive tutorial
Step-by-step guide
Organize steps into groups
Groups make long tests more readable and let you structure the flow by feature.
Right-click on the step where you want the group to start, then select Create a step group from here.
Click the group to expand it, then edit its name (for example "Free trial", "Login").
Click Create a new group to add an empty group you can fill later.
Click the ... icon on the group, then click Delete.
Deleting a group also deletes all the steps it contains.
Insert reusable components
Click the + icon, then select Insert a reusable component.
Select the desired component from the list. The corresponding steps are inserted into your test.
If any steps duplicate the inserted component, right-click them and select Delete.
Modify selectors
Click the arrow on the right side of a step to display the selector side panel.
Use the Kompagnon extension and click Find selector to identify a more reliable selector.
Copy the selector from the extension and paste it into the corresponding field. A green icon confirms the selector is valid.
Add and reorder steps
Click the add icon between two existing steps, or click Add a step at the end of a group.
Select the action type from the dropdown (click, text input, etc.).
Fill in the required fields: step name, selector, value. The name matters because it identifies the step in results.
Drag and drop steps to change their execution order.
Use variables
Instead of hardcoded values, use variables to make your tests reusable.
In a value field, click the icon.
Select a variable from a previous step, a random value, or a global variable.
What's next?
Last updated on