1 ElementNotSelectableException: Occurs when an element is not selectable.
2 ElementNotVisibleException: Element is present in the DOM but it is not visible. So WebDriver is unable to interact with the element.
3 NoAlertPresentException: This exception occurs when there is no Alert is present in the DOM. So WebDriver couldn’t be switched to the Alert.
4. NoSuchElementException: Occurs when element is not found in the DOM.
5. NoSuchFrameException: This exception occurs when target frame doesn’t exist to switch to.
6. NoSuchWindowException: Occurs when target window doesn’t exist.
7. StaleElementReferenceException: It occurs when a reference to an element is stale.
Stale means element is no longer appears on the DOM.
Reasons for StaleElementReferenceException:
- Element present inside an iFrame may have refreshed.
- Page may have refreshed or you are no longer on the same page.
- The element may have been removed or re-added to the page.
8. TimeoutException: Occurs when there is no enough time for the command to execute.
9. ScreenshotException: Screenshot capture was impossible.
Tags: selenium exceptions, exceptions in selenium, java exceptions, common exceptions asked in selenium webdriver, selenium webdriver, selenium, webdriver, selenium automation testing, screenshot using selenium, selenium training, selenium online training, selenium qa testing, selenium automation tool, selenium testing, selenium tutorials.
1 General selenium questions – Click here
2. Selenium Interview Questions – Click here
3. Selenium Interview Questions – Part 2 – Click here
4. How to handle alerts in selenium – Click here
5. Common exceptions in selenium – Click here