Working with Assertions in Selenium

Posted By : Kunal Sharma | 08-Jun-2015

There are 3 different types of assertions in Selenium:-


1. Assert

If the user uses this type of assertion in the test case, it will abort the test case if the assertion fails. However, if you are running a test suite, the next test case will be executed.


2. Verify

Using this assertion will not abort your test case even if the verify fails. It will continue to execute the test case and will log the failure for the conditions failed.


3. WaitFor

This command waits for a specific condition to become true. If the condition is already true, the execution of test case will continue, else it will wait for the condition to become true. If the condition doesn't become true within defined time-out period, the test case will fail and halt.



Related Tags

About Author

Author Image
Kunal Sharma

Kunal is a bright QA Engineer with skills in Manual and Automation Testing.

Request for Proposal

Name is required

Comment is required

Sending message..