Adding and removing steps in a sequence
Right-click any step to open the context menu.
Available actions include:
-
Add HTTP call -
Paste cURL -
Add Loop -
Add If..else -
Add Wait -
Add comment -
GrouporUngroupsteps -
Deleteselected steps
Using Set Value with Data Items
To set a value dynamically:
-
Right-click within the sequence and choose
Set value. -
The right-hand panel opens, allowing you to configure:
-
Value Source: Default or Data Item
-
Table ID: Select which Data Item table to reference
-
Type: Specific, Random, Sequential.
-
Column Name: Choose the column in your Data Item
-
Target Variable: Name the variable that stores the selected value
-
Example behaviors:
-
Specific: Uses one fixed cell value.
-
Random: Pulls a random value from the column.
-
Sequential: Moves down the column each iteration.
When the end is reached, it starts over.
Referencing table rows by negative index
The set-value step supports negative row indexing for table data items. This allows you to reference rows relative to the end of a table for example, always targeting the most recently added row without knowing the total row count at execution time.
Syntax
Negative row indexes use the same R prefix as standard row references, followed by a negative integer.
|
Index value |
Row referenced |
|---|---|
|
|
First row |
|
|
Last row |
|
|
Second-to-last row |
|
|
Third-to-last row |
The same syntax also applies when referencing a specific named column within a table data item:
|
Index value |
Behaviour |
|---|---|
|
|
Last row of the column named |
|
|
Second-to-last row of the column named |
Replace ANYNAME with the actual column name in your data item.
Example use case
A sequence creates a new record in an application and then reads it back to validate the response. Using R-1 in the set-value step always targets the latest row, regardless of how many rows the table currently contains. This removes the need for a separate step to count the rows before reading.
Validation behaviour
The following index values are not valid and will not resolve to a row:
|
Invalid value |
Reason |
|---|---|
|
|
Zero is not a valid row reference |
|
|
Equivalent to zero; not valid |
|
|
Not a recognised row index format |
|
|
Malformed; only a single integer after the prefix is supported |
Use strictly the format R followed by a non-zero integer (positive or negative). If an invalid index is entered, the step will not return a value at execution time.
Runtime edge cases
-
Empty table: If the table data item contains no rows, a negative index cannot resolve and the step will not return a value.
-
Single-row table:
R-1andR1both resolve to the same (only) row. -
Index out of range: If the negative index points beyond the start of the table (for example,
R-5on a table with only three rows), the step will not return a value.
Importing and managing Data Items
-
Click Add new item → Data Item in the file explorer.
-
Name your data item meaningfully (for example,
ContactInfoDataorProductTable). -
Choose the Data Type:
-
Table
-
AD Users
-
JSON
-
Dictionary
-
String
-
CSV/Excel import
-
Go creates a table view where you can add, remove, or rename columns and rows.
Searching inside a sequence
Press Ctrl+F to bring up the in-sequence search functionality. It provides live results as you type, with clear highlighting across steps, recorded requests and responses, and actual request/response data.
To read more about how it works, go here: In-sequence search functionality.
Populating a data item
Every new data item starts with:
-
3 columns
-
3 rows
You can add or delete rows and columns freely. Data can be entered manually or imported:
-
Manual: Click any cell and type directly.
-
Import: Click Import File and upload a
.csvor.xlsxfile.-
Go will parse headers as column names.
-
The table is immediately ready for use.
-
Data Items can represent users, credentials, products, orders, or any test data you want to inject into your flows.
Getting Go to generate random values for you
Go can automatically create random or realistic data.
Right-click and choose Generate random value.
Five types are supported:
-
Randomizer: Random number or date (requires min/max values or date format).
-
Text: Product reviews, lorem ipsum, URLs, domains, vehicle data, and more.
-
Company: Company name, suffix, or catchphrase.
-
Address: Street, building, city, country, or zip code.
-
Person: Name, title, phone, email, username, or password.
Working with Active Directory Users
To simulate real authenticated sessions:
-
Create a Data Item of type
AD Users. -
Populate columns for Name, Username, Password, and Role.
-
Assign the AD Users table in the sequence header or timeline settings.
Go will use these credentials to log in to your application before executing recorded steps.
Parameterization
You can replace any hard-coded value in your sequence with a variable.
For example:
-
Replace an image number with a random variable to load dynamic assets.
-
Add assertions on response headers to verify resource type, size, or expected value.
Mark a Set Value step as secure
You can mark a Set Value step as secure when it contains sensitive information such as passwords, API keys, access tokens, or other secrets. After a value is marked as secure and the sequence is saved, Leapwork Go masks the value throughout the user interface. The original value can no longer be viewed. Despite being hidden from the interface, the value remains available during execution. Any HTTP steps or other components that reference the secure value continue to use the original value at runtime. Secure values are protected throughout the lifecycle of the sequence. They are not exposed in logs, exported packages, or other locations where sensitive information could be revealed.
Import and export behavior
When a sequence containing secure values is exported, the exported package contains masked placeholders instead of the original values. After importing the package into another environment, secure values must be entered again before the sequence can be executed successfully. Leapwork Go displays a notification when imported sequences contain secure values that require attention.
After a secure value has been saved, the original value cannot be recovered. If you need to change the value, enter a new one and save the sequence again
Use unquoted variables in JSON request bodies
Variables can be used without quotation marks in JSON request bodies.
When an unquoted variable is resolved during execution, Leapwork Go automatically determines the appropriate JSON type and inserts the value accordingly. This allows numbers, Boolean values, and null values to be sent as native JSON types rather than strings.
For example:
{
"userId": %%userId%%,
"isActive": %%isActive%%,
"name": "%%userName%%"
}
In this example, userId is sent as a numeric value and isActive is sent as a Boolean value because neither variable is enclosed in quotation marks.
The userName variable remains a string because it is enclosed in quotation marks.
Quoted variables continue to behave as they did previously and always resolve to strings.