storedVars... - Selenium IDE command

UI Vision Selenium IDE++ (Kantu) V5.0: The storeEval command and with it storedVars are deprecated. Please use the new executeScript. Old macros with storeEval and storedVars continue to work without any change. With executeScript storedVars is no longer needed to manage variables and arrays, since you can access variables and arrays directly now:

Example:

storeEval | storedVars['T1'].toUpperCase() | var

becomes

executeScript | ${T1}.toUpperCase() | var

Arrays in Selenium IDE

Arrays in Selenium IDE are Javascript arrays. To create a Javascript array use the executeScript_Sandbox command (see forum post).

--- Old storedVars documentation ---

storedVars gives you access to the stored variables within a JavaScript snippet. Inside storeEval you can access the value of a variable with the ${T1} notation. But if you want to use the variable itself (e. g. as in storedVars['T1'].toUpperCase()), then use the storedVars notation. StoredVars in the Ui.Vision RPA Selenium IDE works the same as in the Firefox IDE, even so internally the implementation is different.

storedVars Screencast

This video shows a real life use case of storedVars to access values from an array. In the demo we store the names of the breadcrumbs (A,B,...) in the array, and then loop over the array to access each page:

storedVars Example

The result of this macro is that CCC will contain 75 and T2 will contain "SELENIUM IDE" all in caps.

Command Target Pattern/Text
open https://ui.vision/
store AAA 100
store BBB 25
storeEval storedVars['AAA']-storedVars['BBB'] CCC
store SeLeniUM iDE T1
storeEval storedVars['T1'].toUpperCase() T2

Works in

Ui.Vision RPA for Chrome Selenium IDE, Ui.Vision RPA for Firefox Selenium IDE, Firefox IDE Classic

Related Demo Macros

DemoStoreEval

The ready-to-import-and-run source code of all demo macros can be found in the Open-Source RPA software Github repository.

See also

storeEval, store, Web Automation Extension User Manual, Selenium IDE commands, Classic Firefox Selenium IDE.

Anything wrong or missing on this page? Suggestions?

...then please contact us.

<em>Ui.Vision RPA</em> Selenium IDE for Chrome and Firefox - Web Test Automation

Fresh from the Ui.Vision Forum: The Latest 3 Topics. Join the discussions:

← Meet the Ui.Vision team and users in our forums.