By default, when you start recording a browser test, the mabl Trainer adds a default Visit URL step to the app.url
under test. If you need to visit other URLs in a test, you can add additional Visit URL steps.
Focused testing
Visit URL steps can be useful if you need to test something on a specific page in your application. Once you log in, add a visit URL step to skip navigation steps and get right to what you want to test. Make sure that site navigation is covered in at least one test so that you can skip it elsewhere.
Adding a Visit URL step
- Click on the plus icon to add a step.
- Select Visit URL from the Trainer step menu.
- Enter the URL value. You can enter a string template or variable value into the navigation bar.
- Click OK. A new Visit URL step will appear in the Trainer, and it will navigate to the URL that appears in the preview.
String values can reference variables.
In addition to this method, there are two other ways that you can record a Visit URL step in the mabl Trainer:
Visit a static URL
- Turn the Rec button on if it isn't on already.
- Type the URL into the navigation bar.
- Press enter. As long as the Rec button is on, the mabl Trainer will automatically record a "Visit URL" step.
Visit a URL assigned to a variable
- Click the {x} button at the bottom of the mabl Trainer.
- Select Use an existing variable .
- Click on the URL to visit button.
- Choose the variable from the dropdown.
- Click OK . A new Visit URL step will appear in the Trainer, and it will navigate to the URL assigned to the selected variable.