Selenium exceptions and their possible reasons
- ElementNotSelectableException
Thrown when trying to select an unselectable element.
- ElementNotVisibleException
Thrown when an element is present on the DOM, but it is not visible, and so is not able to be interacted with.
Thrown when an error has occurred on the server side.
Thrown when switching to no presented alert.
Thrown when element could not be found.
Thrown when frame target to be switched doesn’t exist.
Thrown when window target to be switched doesn’t exist.
- StaleElementReferenceException
Stale means the element no longer appears on the DOM of the page. Thrown when a reference to an element is now “stale”.
Thrown when a command does not complete in enough time.
- UnexpectedAlertPresentException
Thrown when an unexpected alert is appeared.
- InvalidCookieDomainException
Thrown when attempting to add a cookie under a different domain than the current URL.
Thrown when the selector which is used to find an element does not return a WebElement.
- InvalidSwitchToTargetException
Thrown when frame or window target to be switched doesn’t exist.
Thrown when the attribute of element could not be found.
Base webdriver exception.
It was great article for my work. I appreciate your work and love it. Thanks...! Selenium Training Institute in Pune
ReplyDelete