storeValue - Selenium IDE
storeValue (target, pattern) - Selenium IDE command
The storeValue command is used to move the value of an element into a variable for future use. Note that for website input boxes the text is the value, so storeValue is used to retrieve text from inside input boxes. In other words, use storeValue for web scraping information from input boxes, select boxes or textareas.
Important: For extracting the status from checkboxes and radiobuttons you must use storeChecked. For extracting text from "normal" HTML, use storeText.
PS: Do not confuse storeValue with storeEval, which sounds similar but is a very different command.
storeValue Example
The macro extracts the hardware information from this textarea form field.
Command | Target | Pattern/Text |
---|---|---|
open | https://a9t9.com/kantu/docs/selenium-ide/storevalue | |
storeValue | id=Readonlytask_Description | mytext |
echo | Extracted Text = ${mytext} |
Works in
Kantu for Chrome Selenium IDE, Kantu for Firefox Selenium IDE, Firefox IDE Classic
Related Demo Macros
DemoExtract
The ready-to-import-and-run source code of all demo macros can be found in the Github repository testmacros folder.
See also
storeText, 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.
