Skip to content

Commit

Permalink
[DOCS-9306] Synthetics browser tests: extract multiple variables (#25952
Browse files Browse the repository at this point in the history
)

* extract multiple variables

* Update content/en/synthetics/browser_tests/actions.md

Co-authored-by: Heston Hoffman <[email protected]>

---------

Co-authored-by: Heston Hoffman <[email protected]>
  • Loading branch information
aliciascott and hestonhoffman authored Oct 28, 2024
1 parent 74ce8a9 commit 6d3bb8d
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions content/en/synthetics/browser_tests/actions.md
Original file line number Diff line number Diff line change
Expand Up @@ -472,6 +472,18 @@ If a variable is assigned different values along your browser test steps (for ex

Some variables only compute at runtime, such as a variable from an HTTP request or a JavaScript step. For example, assume you have a `Type text` step featuring `{{ <YOUR_VARIABLE_NAME> }}`. At test execution, `{{ <YOUR_VARIABLE_NAME> }}` is systematically replaced by your variable's associated value. To record a step using one of these variables, record a step with the actual variable value, and replace the actual value with `{{ <YOUR_VARIABLE_NAME> }}` in the step's definition before saving your test.

### Use multiple variables

You can add multiple variables to your browser test recording steps.

In your browser test recording, click the **+ Add Variable** button to add one or more variables to your test:

{{< img src="synthetics/browser_tests/extract_multiple_variables.png" alt="Defining a local variable from global variables" width="90%" >}}

In your browser test's recorder, add a step recording, and click **Extract variables from the response(optional)** to extract and use the variables in your browser test:

{{< img src="synthetics/browser_tests/edit_test_extract_multiple_variables.png" alt="Injecting a local variable into a field during a browser recording" width="90%" >}}

## Edit a recording

To edit a browser recording after it's saved:
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 6d3bb8d

Please sign in to comment.