You can use variables in automated tests. There are two kinds of variables you can use:
- variables from the data repository
- variables created and assigned their value within the test (see the TestFirst Gherkin Specification for the sentences that have this capability).
Regardless of the type of the variable, the syntax will be the same. You will need to enclose the variable in double curly braces, like this:
"{{variable_name}}"
Example:
When I type "{{username_qa}}" in "Username or Email"
In the example above, username_qa
is the name of a variable. Thus, when this step is executed, the value of this variable will be typed into the "Username or Email" element of the page.
Comments
0 comments
Please sign in to leave a comment.