This article explains the steps to dynamically use values generated or retrieved in a JavaScript step or a Playwright code step in subsequent steps (e.g., Input text or Navigate).
Steps
1. Create a step that outputs a value
First, set up the step that generates and passes the value.
In the scenario editor, add a JavaScript step or a Playwright code step.
Write the process in the Code field of the step.
At the end of the code, return the value you want to pass to the subsequent steps using the
returnstatement.Example of a JavaScript step:
return "test";Example of a Playwright code step:
const title = await page.title(); return title;Note: If there is no
returnstatement, the value will not be passed to the subsequent steps.Save the step.
2. Reference the value in a subsequent step
Next, set up the step that receives the output value.
Open the edit screen of the step where you want to use the value (e.g., Input text).
※This step must be placed after the step that passes the value.
Click the dropdown above the field where you specify the value (default: Given value) and select Other step's output.
.png?sv=2022-11-02&spr=https&st=2026-04-07T19%3A52%3A06Z&se=2026-04-07T20%3A03%3A06Z&sr=c&sp=r&sig=bfospuS3cxI1ZIUgBqrpHZboZjWAVLVu3JMh1fzZIJQ%3D)
From the displayed dropdown list, select the step created in Step 1.
.png?sv=2022-11-02&spr=https&st=2026-04-07T19%3A52%3A06Z&se=2026-04-07T20%3A03%3A06Z&sr=c&sp=r&sig=bfospuS3cxI1ZIUgBqrpHZboZjWAVLVu3JMh1fzZIJQ%3D)
Save the step.
Notes
Step order: To reference a value, the source step (such as a JavaScript step) must be placed before the destination step.
Data type: The value returned by
returnis passed to the subsequent steps as a String.Conversion to Playwright code step: A step using Other step's result cannot be converted to a Playwright code step.