Reuse Existing Steps and Scenarios in the Recorder
You can reuse steps from previously recorded tests or AI Test Engineer scenarios in the Recorder. Reusing existing steps and scenarios reduces duplication, promotes consistency, and simplifies maintenance when logic changes in the future.
In Recording Mode, running an existing step or scenario adds it to the current test being recorded. This is useful when your current test reuses actions from previously recorded tests.
Example Use cases
Reuse the "Login" step.
Avoid re-recording the login process across multiple tests. This helps standardize the login flow and simplifies updates if the login logic changes later.
Reuse the "Navigate to Dashboard" step.
Ensure consistent navigation when multiple tests require starting from the dashboard.
To reuse an existing step or scenario in Recording Mode:
Navigate to the page where you want to reuse a step or scenario.
Ensure the application is in the correct state to receive the reused steps and actions.
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 Add and run existing step/scenario icon.
image
Use the search bar to filter steps or scenarios by name. The most relevant results appear at the top.
Choose one of the following options:
**Add and run step ** – Adds the step to the test and runs it.
Add step – Adds the step without running it.
Run step – Runs the step without adding it.
If the step has parameters, you'll be prompted to enter values before execution.
The selected step or scenario executes (if applicable) and may be added to the current test.
NOTE
Don't forget to Generate code and Save after finalizing all your steps.