Showing posts with label echo command. Show all posts
Showing posts with label echo command. Show all posts


How to use "storeAttribute" command in selenium


"storeAttribute" command stores the attribute value of specified element in given variable. You can store any attribute's value using "storeAttribute" command. You need to provide proper path of element node followed by an @ sign and then the name of the attribute (e.g. a@href . Here "a" is element's node name and "href " is

Selenium "storeEval" command
"storeEval" command is generally used with scripts in selenium IDE software testing tool. It is useful to store result of the script in to specified variable and latter on we can use that variable's value whenever required.

'storedVars' - JavaScript associative array
'storedVars' is JavaScript associative array having string indexes and is useful to manipulate or access a variable value within a JavaScript snippet.

"storeText" command

"storeText" command in selenium IDE software testing tool is useful to store text value of page element of software web application in to variable for future use.

See bellow given example. In this example, When "storeText" command will be executed in selenium IDE software testing tool, value of page element "css=#gb_2 > span.gbts" will be stored into variable "k". If specified target element ("css=b" in this case) will be not found on software web application's page then it will show error message like "[error] Element css=b not found" in log area of selenium IDE window.

Note : Need Examples of all selenium IDE softwarecommand tutorials? Click Here to view them.

New Test
Command Target Value
open https://www.google.co.in/
storeText css=#gb_2 > span.gbts k
echo ${k}

"storeTextPresent" command

"storeTextPresent" command is not for storing value of any target element, but it is useful to verify that

 "store" command

"store" command is useful to store value or string into variable in selenium IDE software testing tool. When you want to use some value at some other command, you can store that value.

Bellow is the example of "store" command in selenium IDE software testing tool. It will store string "Hello" into variable "i". I can use that string in any next commands.

New Test
Command Target Value
open https://www.google.co.in/
store Hello i

"echo" command

 "echo" command is useful to know stored value of any variable. We can use it for debugging purpose.