Reuse Existing Steps in Recorder
You can reuse steps from previously recorded tests or AI Test Engineer scenarios in the Recorder. Reusing step definitions helps avoid repetitive actions and reuses the same step code, simplifying maintenance if you need to change the step logic in the future.
Reusing Steps in Recording Mode
In Recording Mode, running an existing step adds it to the current test being recorded. This is useful when your test can reuse actions from other tests.
Example Use cases
Reuse the "Login" step to avoid re-recording the entire login process across multiple tests.
- This helps standardize the login process and avoids duplication.
Reuse the "Navigate to Dashboard" step when performing tests that require starting from the dashboard page.
- This ensures consistent navigation logic and simplifies test maintenance.
To reuse an existing step in Recording Mode:
Navigate to the page where you want to reuse an existing step during Recording.
Note
Ensure the application is in the correct state to receive the reused steps and actions.
For example:
Existing Step - Login: Dismiss cookies, enter username, and enter password.
If the cookies popup has already been dismissed, the reused step might fail as the popup is no longer displayed.
In Recording Mode, click the plus icon at the top right and select Add and run existing step.
Select the step you want to run. You can filter steps by name to narrow down the search.
- If the step includes parameters, you will have the option to modify parameter values before running the step.
The step will execute and be added to your current recording.
Reusing Steps in Paused Mode
In Paused Mode, running an existing step only executes it without adding it to the current recording. This is useful when you want to run steps but don't need to include them in the recorded test.
Example Use cases
Run the "Logout" step in paused mode to reset the application state without adding it to the recorded test.
- The user may need to log out for verification purposes but doesn't want this action recorded in the current test.
Run the "Clear Cache" step in paused mode to ensure a clean testing environment without adding it to the current recording.
- The user wants to clear the cache during testing but doesn't need this action in the final test flow.
NOTE
Don't forget to Publish your scenario after finalizing all your steps.