When adding parameters to groups, you can make it much more general and reusable.
Let's go over a common scenario, where we want to create a login group which accepts a username and password parameters, and then set its value to the corresponding input fields.
Record the steps
First, we'll record simple flow of login:
- Set username.
- Set password.
- Click "Login".
4. Select the login steps and group them together to a "Login" group.
5. Select the "Login" group we created, and open its Properties panel
Name the parameters and set their values:
- username - set the values to 'demo_user'
- password - set the value to '12345'
Note: When placing a constant value in the parameter value field use ' ' around it.
Great, so now we have a group that gets two parameters (
password). Now we need to set its inner steps to use those values.
- Step into the group, by double-clicking the group.
- Select the 'Set "User Name"' step.
- Change the value in the Properties panel from the current static value to the new group parameter:
Now we'll do the same for the 'Set "Password"' step:
We have a login group with parameters, that can be easily reused with a different set of values without the need to change the group itself.