A command tells Selenium what to do. There are three 'types' of Selenium commands: Actions, Accessors and Assertions. Each command must contain command name, target and value:
Accessors examine the state of the application and store the results in variables, e.g. "storeText". They are also used to generate Assertions automatically.
Assertions are like Accessors, but they verify that the state of the application is as expected. All Selenium Assertions can be used in 3 modes: "assert", "verify", and "waitFor".
"WaitFor" commands waits until some condition become true. When the condition becomes already true, test will succeed. If the condition has not become true within a specified time-out, test will be considered as failed.
If "verify" command is failed the test script continues to run with the entry in the error log.
If"assert" command is failed the test script is aborted.
Let’s look at the most frequently used “assert” command.
Check the title of the page (by comparing the expected).
Argument: expected page title.
Returns: TRUE if page title matches to the expected, FALSE otherwise.
If title does not matche to the expected the test will fail.
Verify that the specified element is somewhere on the page.
Arguments: locator - an element locator.
Returns: TRUE if the element is present, FALSE otherwise.
It verifies that the specified element is somewhere on the page, if element wasn’t found, test will fail.
Check that the specified element is checked or not.
Arguments: locator - an element locator pointing to a checkbox or radio button.
Returns: TRUE if the checkbox is checked, FALSE otherwise.
If the specified element doesn't exist or isn't a toggle-button, test will fail.
Arguments: expected message text.
Returns: TRUE if the alert message matches to the pattern, FALSE otherwise.
It verifies that the specified cookie has specified value.
Arguments: name - the name of the cookie, pattern - expected value of the cookie.
Returns: TRUE if the value of specified cookie matches to the pattern, FALSE otherwise.
It receives the value of specified cookie and compares it with the pattern, if the value does not match or cookie is not present, test will fail. Many of “assert” commands have a pair like “assertnot”. Difference between this commands is only that: if “assertnot” command returns true, test will failed. Here is only a small part of selenium “assert” commands. If you want to learn more you can read Selenium Command Reference (http://release.seleniumhq.org/selenium-core/1.0.1/reference.html). Also you can type first letters of any command in Selenium IDE command input to see possible variants, select one and see description on reference tab.