Waldo enables you to create and re-use variables for text interactions when recording your tests.
You can use those variables to standardize a value or to generate a new unique text every time your flow will be replayed.
A variable is a pattern that is used to generate text each time your test is replayed.
Variables are generally used when you need to generate a unique value for each replay. They can also be used to give an easily recognizable name to a long or complicated text.
Here's an example you may encounter where variables are a great benefit: To test the account creation in your application, you will need to ensure the email that Waldo uses for each signup is different or it will be rejected. This is where variables come in handy and allow you to create a test that will always generate a brand-new account.
- Unique email (Signup email, member invitation, share feature...)
- Unique text (Name, username, identification code...)
- Constant text (barcode value, long description...)
Creating a variable is very simple:
- Start by launching the recorder.
- Interact with your application until you reach the step to input text.
- Select the input field. The Input Controls panel will show up at the bottom right of the recorder.
- Click the
+ Create variablebutton in the bottom right of the Input Controls panel.
- The pop-up to create a new custom variable will appear.
- Start by filling out the name of the variable you want to create in the
You have multiple options here on the type of variable to create :
- To create a unique email variable, click the
Fill with unique emailbutton to insert the value.
- To create a unique text variable following a specific pattern, enter your pattern text in the
VALUEinput and click the
Append unique hashbutton to insert the value.
- To use a variable to name a longer text, just enter the text in the value field.
Append unique hashbutton will append the text "|UNIQUE_HASH|" to your value. This is what will be replaced by a unique value every time by the system.
- Once you are satisfied with the value input, click the
- The variable is now created! It will be pre-selected in the input control as the value to send. It also appears in the "Suggested Inputs" section.
Send textand the text will be generated and sent to your application.
There you have it! You have successfully utilized a variable! Keep in mind that the generated value will stay the same for your entire recording.
Whether you are updating a test or using a test as a dependency, any variables created that are attached to that test will show up in the Suggested inputs of the Input Controls panel.
Using a previously created variable is very simple.
- In the recorder, navigate to the input field in your application, where you want to use the variable.
- Select the input field so the Input Controls panel appears.
- Your previously created variable will appear in the Suggested inputs of the Input Controls panel. You can recognize variables as they all start with the symbol
$and are shown in capital letters.
- Select the variable that you want to use by clicking it in the Suggested inputs.
- It should now appear in the input field.
Send textto send your variable to your application!
Do not forget to click the
Send textbutton to actually send the interaction.
Variables are a great way to organize your text interactions, making them flexible and easily re-usable.
We recommend using variables for any texts of two or more words to easily recognize the texts you use in your flows.
Updated 7 months ago