Variables in Test Studio

Good afternoon,

We have recently upgraded to version 23.3 of Create and one of the features (from 23.2 I believe) that has been added is the ability to use variables in test studio.

I’ve set up some writeable variables to capture information during the course of a test, hoping to then be able to reference them in a later step to validate a field. However, I can’t see a way to do this.

Can anyone let me know how to achieve this, or equally if I’ve misunderstood how variables are meant to be used please let me know.

Thanks,
Dominic

Hi @Dominic ,

Variables are a powerful way to create and run tests :slight_smile:
The way to use them would be during the recording of a test. There is a new option on the recording panel called ‘Variables’

Storing a value within a variable
Click on the Variables button on the recording panel.
On-click, you’ll be prompted to click on an element on the page (just like assertions)
After selecting an element on the page, the side panel will give you the option to write to a variable, and which variable.
On execution of this step, the variable will store the element’s value.

Using the variable
Click on the Variables button on the recording panel.
On-click, you’ll be prompted to click on an element on the page (just like assertions) - However, on this occasion, select an input of some sort (e.g. text field).
After selecting an element on the page, the side panel will give you the option to copy the value from the variable, and which variable you want to extract the data from.
On execution of this step, the form field will be populated with the text stored in the variable.

Hope this helps :slight_smile: