Selenium IDE Variables

With Selenium IDE it is possible to store variables.
These variables can then be used in later commands during the same test flow.

How to store a variable

To store a variable during a test, please use the store command:

store - javascript(return "test" + Math.floor(Math.random()*11111) + "@test.com") - emailAddress

This example will store a variable called emailAddress and its value will be a random "test....@test.com" string.

Storing a variable happens in the context of the page. You can use any kind of javascript and reference DOM elements or other functions available on the page. The return value is stored.

How to use a variable

Once you have stored a variable, you can use it in subsequent steps: ${emailAddress}