Set Value

Set Value

This building block includes Leapwork’s unique field recognition. The block recognizes the relationship between a field name and a value (protected versus unprotected fields). Leapwork recognizes the field and sets the first unprotected field behind it. This recognition strategy makes it much easy and faster to automate tests in green screen.

Keep in mind that if there’s already a value in a field and you start typing in the “Set Value” block, the previous value will be automatically cleared if the unprotected field is visible and not empty. Invisible fields are not cleared, as they are usually made for passwords.

Building Block Header

The green input connector (top left) triggers this block to begin execution.

The green output connector (top right) is triggered when the value has been successfully set.

You can always change the title of a block by double-clicking on it and typing in a new title.

Field name

This is automatically populated based on the closest protected field to the left.

Text fields

This is used to add any number of fields that can contain dynamic content and be used as tokens in the Field name value.

Field value

This represents the number or text that will be entered into an unprotected field.

Use occurrence

This allows you to specify which occurrence to use in case you have multiple matches.

Index

The blue connector on the left feeds a value from a previous building box into the index field, and the blue connector on the right can repeat this process for a following building block.

The index identifies which unprotected field to be used in cases where there are several unprotected fields with the same protected field.

Not found

The green output connector is triggered if the field is not found before the timeout (see below). This is typically used to a flow or to explicitly fail a case by linking it to a Fail block.

Default timeout

If the 'Default Timeout' property checkbox is not selected, then the timeout value will be set to 10 seconds unless changes manually. If the 'Default Timeout' property checkbox is selected, then the 'Default timeout' value selected in the flow settings (under “Max. run time) will be applied.

The Green Screen Recorder and building blocks are available with Enterprise plans.