All these three commands useful only some time when you have multiple buttons or multiple fields or multiple links on page and you need ids of every element. Let me describe all these commands with example for better understanding.
"storeAllButtons" Command
If you are working on any webpage and you need ids of all available buttons on page then you can use storeAllButtons command. This command will store all buttons ids in given variable.
New Test | ||
Command | Target | Value |
open | https://www.google.com | |
storeAllButtons | i | |
echo | ${i} | |
storeAllFields | j | |
echo | ${j} | |
storeAllLinks | k | |
echo | ${k} |
In this example, storeAllButtons will store ids of all available buttons on google home page in variable "i". If
any button has not any id then it will return null.
"storeAllFields" Command
Same as storeAllButtons command, "storeAllFields" Command will store ids of all input fields of page in given variable "j" as shown in above example. Same way, if any field has not id, it will return null.
"storeAllLinks" Command
storeAllLinks command used for storing ids of all available links on page. In above example, it will store into variable "k"
No comments:
Post a Comment