Intellipaat Back

Explore Courses Blog Tutorials Interview Questions
0 votes
2 views
in Selenium by (55.6k points)

Can anyone tell me what is assertion in selenium?

1 Answer

0 votes
by (119k points)

Assertion is to check whether the actual result is the same as compared with the expected result. In case the assertion fails, then the test case is failed and will stop the execution.

There are two types of Assertion:-

Hard Assertions: Hard Assertion that throws the AssertException when the test case is failed

Soft assertions: Soft assertions do not throw an exception if an assertion fails and continues with the next step after the assert statement

If you are interested to learn Selenium, I recommend this Selenium Certification course by Intellipaat.

31k questions

32.8k answers

501 comments

693 users

Browse Categories

...