assertChecked (target), verifyChecked (target) - Selenium IDE command

The assertChecked and verifyChecked commands will both just verify the checked status of targeted check box or radio button. It will be pass successfully if check box is checked else return error '[error] false' in the execution log.

You can use !LastCommandOK internal to check on the outcome of the assert and or verify commands with if or gotoIf.

Assert and verify commands are both useful for verifying condition match or not. The difference is that verify command will verify the condition and if it does not match, it will only show an error message in log area and the macro continues to run. With the assert command, if the condition does not match then it will stop remaining macro execution in the selenium IDE software testing tools.

Closely related to this command is storeChecked.

assertChecked, verifyChecked Example

This macro checks the status of two checkboxes of a website. If "is18" is not checked the execution stops.

Command Target Pattern/Text
verifyChecked id=firsttimeuser is18
assertChecked id=over18 is18

Works in

Kantu for Chrome Selenium IDE, Kantu for Firefox Selenium IDE, Firefox IDE Classic

Related Demo Macros


The ready-to-import-and-run source code of all demo macros can be found in the Github repository testmacros folder.

See also

storeChecked, AssertText, VerifyText, Web Automation Extension User Manual, Selenium IDE commands, Classic Firefox Selenium IDE.

Anything wrong or missing on this page? Suggestions?

...then please contact us.

Kantu Selenium IDE for Chrome and Firefox - Web Test Automation
Subscribe to the a9t9 automation software newsletter . We'll send you updates on new releases that we're working on.