env
that is accessible from any step in your test. You can access these variables using the templating syntax {{ env.VARIABLE_NAME }}
.
Reserved variables:
BASE_URL
: The base URL of the environment. This is automatically set when you create a new environment and can be used to construct URLs for your tests.CURRENT_URL
: The current URL of the page being tested. This is updated automatically as you navigate through your test.ENV_NAME
: The name of the environment. This is also automatically set when you create a new environment and can be used to identify the environment in your tests.TEST_NAME
: The name of the test. This is automatically set when you create a new test and can be used to identify the test in your tests..env
or JSON file.
setVariable
setVariable
function.
USERNAME
variable to testuser
and the PASSWORD
variable to a random string. You can then access these variables in other steps using the templating syntax {{ env.USERNAME }}
or {{ env.PASSWORD }}
.
{{ env.NUM_BUTTONS }}
.
{{ }}
. All input fields support the templating syntax.
For example, if you have set a variable named USERNAME
, you can access it like this:
API_KEY
, you can access it using {{ env.API_KEY }}
.