The following steps will help you validate elements using verify mechanism.
- Go to Firefox Browser-> Tools Menu and launch Selenium IDE.
- Ensure the ‘Record’ option is enabled by default.
- Go to the Google home page.
- Right-click on the UI element to be validated on the Google page, e.g. Google Logo.
- Select ‘Show All Available commands’ from the right click menu option.
- From the sub-menu options displayed for the ‘Show All Available commands’ select the ‘VerifyElementPresent’ option.
- This will add the ‘VerifyElementPresent’ element. This can be verified by navigating to Selenium IDE->Table tab.
- To turn off the recording process, click on the ‘Record’ button.
- Click on ‘Play current test case’ option to run the recorded validation on Selenium IDE.
- This will display the ‘verifyElementPresent’ command in green color. This ensures that the test is passed and the UI element is present.
- However, if the step gets failed the element will be displayed in red color. This means the element is not present.
Note: If Selenium IDE is not installed on Firefox browser, verify commands in the right click menu and sub-menu options won’t be displayed.