Different types of Selenium WebDriver Common Exceptions
Selenium Testing | Selenium Webdriver Exceptions | Selenium UI Testing

Get Started

with $0/mo FREE Test Plan Builder or a 14-day FREE TRIAL of Test Manager

What is an Exception?

  1. Checked Exception: Checked exceptions are handled during compile time, and if they are not caught and handled during compile time, they cause a compilation problem.
  2. Unchecked Exception: A compiler does not need handling of unchecked exceptions. During compilation, the compiler ignores it.
  3. Error: When a scenario becomes fatal and the software is unable to recover

Example for Exception:

Example of an Exception in Java:

Statement1;
Statement2;
Statement3;  //Exception occurred at this 3rd line
Statement4;  //This line won't be executed
Statement5;  //This line won't be executed

Example for Handling an Exception in Java:

Different types of Exceptions in Selenium WebDriver

  1. NoSuchElementException
  2. ElementNotVisibleException
  3. NoSuchFrameException
  4. NoAlertPresentException
  5. NoSuchWindowException
  6. SessionNotFoundException
  7. StaleElementReferenceException
  8. InvalidSelectorException
  9. ElementNotSelectableException
  10. TimeOutException

In summary

Newest Articles

Best Unit Testing Frameworks in Selenium for Test Automation
Best practices on How to write effective Test Cases in Software Testing
In the dynamic world of software development, quality is paramount. Every line of code, every feature, every functionality needs to… Continue reading Best practices on How to write effective Test Cases in Software Testing
When you should not be using Selenium for Testing
There are a wide variety of automated testing tools available, each with its own set of advantages and disadvantages. Automating tasks… Continue reading When you should not be using Selenium for Testing

© 2025 Bitmodern Inc. All Rights Reserved.