An RPA workflow variable is a named value a browser automation flow can read or update. A reusable status check might read its target URL and expected text from configuration, then save the text it actually sees into a second variable. The same nodes can check another authorized page when you change the inputs.
| Role | Example | Where to define it |
|---|---|---|
| Input | qa.expectedStatus |
Global configuration edited before the run |
| Observation | observedStatus |
The node that reads the status element |
| Outcome | Match, mismatch, or read error | A branch result recorded with the run |
Scope and lifetime depend on the product. For example, Power Automate for desktop distinguishes input, output, and flow variables in its designer. Check which names a node can read and how defaults are supplied in your actual runner. Power Automate variable management
The Nstbrowser Variables guide distinguishes global variables from values saved by nodes. It documents entering globals as JSON and using + Variables or interpolation in text fields. This example uses a read-only inventory status check on an owned test page. The JSON fixture was parsed and its example outcomes checked locally. Run the flow once in your installed client to verify its runtime behavior.
In Global Variables, prepare the target URL and the expected text. The example URL is a placeholder for an approved staging page. A status label is a JSON string, so keep the quotes. Numbers and strings such as 0 and "0" are different JSON values. RFC 8259 JSON format
{
"qa": {
"url": "https://inventory.example.test/status",
"expectedStatus": "Ready"
}
}
In the URL text field of a navigation node, insert ${qa.url} where the field supports interpolation. On the test page, use Get Element Data to read status text into observedStatus, as described in the Nstbrowser Get Data guide. Use a stable selector owned by your app, such as [data-testid="inventory-status"] where the node accepts CSS. Inspect the selected element before adding the comparison. A long selector tied to a page’s structure can break when the layout changes. Playwright locator guidance
Use an IF node to compare the saved observation with the expected status using the fields supported by the installed builder. Select a variable from the picker when available. A value of Ready should take the match branch. A successful read of Maintenance should take the mismatch branch. A failed element lookup belongs in error handling. If the node returns blank text successfully, record an invalid observation before evaluating equality.
Keep defaults in the configuration and produce a fresh observation on each path that uses it. A branch that skips the read must also skip the comparison. If a loop visits several approved pages, validate each observation before advancing the loop. Treat a blank value and a missing value separately if the report needs to distinguish them.
Use the RPA canvas debugger and detailed logs to check the order of operations. Log the run ID, input alias, node name, and branch result. Keep credentials and sensitive page text out of global JSON and debug records. If an execution policy continues after a node failure, add a check that requires a successful read from the current iteration before another node consumes the variable.
| Staging fixture | Expected result | What to verify |
|---|---|---|
Label shows Ready |
Match | The read and comparison finish in the same run. |
Label shows Maintenance |
Mismatch | The flow records a valid read and the alternate branch. |
| Label is removed | Read error | The mismatch branch never receives an old value. |
Run the cases on one test Profile. Then change only the input URL to a second approved fixture that uses the same selector. Repeat the checks and record which fields changed. This verifies the intended reuse boundary before the flow is scheduled.
Q: When should I use a global variable?
Use one for a workflow input that an operator needs to change, such as the staging URL or the expected label. Use a node variable for values produced during the current run.
Q: Why does my variable resolve to empty text?
Check that the producer node ran on the current path, that the name matches, and that the target element actually contains text. Then check whether the receiving field supports interpolation or requires the variable picker.
Q: Can I use the same workflow for several browser Profiles?
Test the flow with one authorized Profile first. Verify that each additional Profile reaches the intended app and supplies the right inputs. Check the installed client for supported scheduling and runtime behavior.