xxxxceptions Flashcards
ElementNotSelectableException
ElementNotSelectableException: An element is disabled (can not be clicked/selected) in spite of being present in the DOM
StaleElementReferenceException
The referenced element is no longer present on the DOM page (a reference to a component is now Stale). For example, the item belongs to a different frame than the current one or the user has navigated away to another page
ElementNotVisibleException
In spite of the element being present in the DOM, it is not visible (can not be interactive). For example, elements defined in HTML with type =”hidden”. It is a subclass of the ElementNotInteractableException
NoSuchElementException
This Exception occurs, when the locators (i.e. id / xpath / css selectors etc) we mentioned in the Selenium Program code is unable to find the web element on the web page. There are two possibilities for getting this Exception, i.e. either we have provided a incorrect locator and trying to find the web element or we have provided correct locator, but the web element related to the locator is not available on the web page.
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
NoSuchFrameException
Webdriver attempts to switch to an invalid frame, which is unavailable
ElementNotInteractableException
An element is not in a state, where it can be interacted with (can not be clicked or able to send keys) in spite of it being present in the DOM
SessionNotFoundException
occurs when driver is trying to perform operations on the Web Application after the Browser is closed or when the Browser Session is not available.
TimeoutException
This exception happens when a command takes longer to complete than the wait time.
WebDriverException
Webdriver is acting immediately after ‘closing’ the browser