Add Checkpoints to Tests in Selenium IDE
Checkpoints compare the expected value of the object to the object’s current values during a test running session. Adding checkpoints in Selenium IDE allows you to validate whether certain conditions or states are met during your test execution.
Add checkpoints in Selenium IDE:
Use Assertions / Verifications
Assertions: These are commands that verify if a condition is true. If the condition is false, the test will stop.
Verifications: These are similar to assertions, but the test will continue even if the condition is false, allowing you to capture multiple failures in a single test run.
Steps to Add Checkpoints
Open Selenium IDE. Launch Selenium IDE and open your test case or create a new one.
Locate the Step to Add the Checkpoint. Find the step in your test case where you want to add a checkpoint.
Add a Command. Click on the line where you want to insert the checkpoint.
Click the “+” button to add a new command.
Choose the Command Type
For Assertions, use commands like assertText, assertElementPresent, assertTitle, etc.
For Verifications, use commands like verifyText, verifyElementPresent, verifyTitle, etc.
5. Specify the Target and Value
Target: This is the locator for the element you want to check. It could be an XPath, CSS Selector, ID, etc.
Value: This is the expected value you want to check. For example, the expected text in an element.