storeText (target, pattern) - Selenium IDE command

The storeText command in the Selenium IDE software testing tool is useful to store text value of page element of software web application in to variable for future use. Do not confuse this with the "storeTextPresent" command which is not for storing value of any target element, but could be used to verify that specified target text is available on page or not. The new IDE does not support storeTextPresent yet (if you need it, let us know!).

storeText Example

Command Target Pattern/Text
open https://a9t9.com/
storeText //*[@id="content"]/div[2]/div/h2[1] name
echo Name var = ${name}

Works in

Kantu for Chrome 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 Github repository testmacros folder.

See also

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

Anything wrong or missing on this page? Suggestions?

...then please contact us.

Kantu Selenium IDE for Chrome and Firefox - Web Test Automation
Subscribe to the a9t9 automation software newsletter . We'll send you updates on new releases that we're working on.