Explain the following Webdriver exceptions: ElementNotVisibleException, ElementNotSelectableException, NoAlertPresentException, NoSuchWindowException, TimeoutException, WebDriverException etc.

ElementNotVisibleException – ElementNotVisibleException occurs when the locators (i.e. id / xpath / css selectors etc) we have provided in the Selenium Program code is trying to find the web element which is in hidden from displaying on the page.

ElementNotSelectableException – An element is disabled (can not be clicked/selected) in spite of being present in the DOM.

NoAlertPresentException- Webdriver is trying to switch to an invalid alert, which is unavailable.

NoSuchWindowException – Webdriver is trying to switch to an invalid window, which is unavailable

TimeoutException – The command did not complete in the specified time. For example, the element didn’t display at the specified time. This is especially encountered when working with waits.

WebDriverException – Webdriver is acting immediately after ‘closing’ the browser

Leave a Reply