All You Need To Know About Exception Handling In Selenium

In the world of technology, exceptions are said to be as old as programming itself. The occurrence of an exception during the execution of code can result in unexpected behavior unless the exception is properly handled in the code. Exceptions are not bad but are a fundamental part of modern programming. Rather than having a fear of exceptions, it is important to know how to tackle which exception at what moment of time. Moving further, we would discuss how to handle exceptions elegantly and use exception handling to write clean code which is more maintainable.

What is an Exception?

The exception is a programmer’s commonly used term regardless of any specific programming language. ‘Exception’ as the name suggests are the events due to which the program ends abruptly without displaying an expected output.