“storeChecked” and “verifyChecked” Commands Tutorials For Selenium IDE

“storeChecked” and “verifyChecked” are check box related commands and are useful to verify current (checked or not checked) condition of check box. Earlier i had published post about 2 related commands – assertChecked and assertNotChecked. All these four commands are working with check box. Now let

me come to the point. “storeChecked” and “verifyChecked” are useful for the check box but for different purpose for your software application as described bellow.

“storeChecked” Command
“storeChecked” command will identify checked status of check box and store value ‘true’ or ‘false’ in variable. It will store ‘true’ in variable if element is checked and will store ‘false’ if element is not checked or unchecked. Later on you can use that value if you need.
“verifyChecked” Command
“verifyChecked” will just verify the check status of targeted check box. It will be pass successfully if check box is checked else return error ‘[error] false’ in execution log. See bellow example of “storeChecked” and “verifyChecked” commands and try it in your software application.

New Test
Command Target Value
open http://only-testing-blog.blogspot.com/2013/09/testing.html
check name=vehicle
storeChecked name=vehicle i
echo ${i}
verifyChecked name=vehicle
pause 3000
uncheck name=vehicle
storeChecked name=vehicle i
echo ${i}
verifyChecked name=vehicle

Note : VIEW MORE CHECK BOX RELATED COMMANDS ON THIS LINK

In above example, It will store ‘true’ in variable i when 1st time “storeChecked” executed because targeted check box is checked on that stage but when it executed second time, it will sotre ‘false’ in variable i because on that stage targeted check box is unchecked. Same way, 1st “verifyChecked” will be pass but 2nd will return ‘[error] false’ execution log.
<< PREVIOUS || NEXT >>

One thought on ““storeChecked” and “verifyChecked” Commands Tutorials For Selenium IDE

Leave a Reply

Your email address will not be published. Required fields are marked *