storeXpathCount - Selenium IDE
storeXpathCount (target, pattern) - Selenium IDE command
The storeXpathCount command is used to retrieve and store the count of the UI elements located using the given XPath locating strategy into a variable in Selenium IDE. In other words, it gets the number of nodes that match the specified xpath (e.g. "//table" would give the number of tables).
storeXpathCount Example
The macro below counts all links on the page.
Command | Target | Pattern/Text |
---|---|---|
open | https://ui.vision/docs/selenium-ide/storexpathcount | |
storeXpathCount | xpath=//a | c |
echo | Number of Links on Page = ${c} |
Works in
Ui.Vision RPA for Chrome Selenium IDE, Ui.Vision RPA 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 Open-Source RPA software Github repository.
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.