09 September, 2015

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.
  • ErrorInResponseException 
Thrown when an error has occurred on the server side. 
  • NoAlertPresentException 
Thrown when switching to no presented alert. 
  • NoSuchElementException 
Thrown when element could not be found. 
  • NoSuchFrameException 
Thrown when frame target to be switched doesn’t exist. 
  • NoSuchWindowException 
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”. 
  • TimeoutException 
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. 
  • InvalidSelectorException 
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.
  • NoSuchAttributeException
Thrown when the attribute of element could not be found. 
  • WebDriverException 
Base webdriver exception.

2 comments:

  1. It was great article for my work. I appreciate your work and love it. Thanks...! Selenium Training Institute in Pune

    ReplyDelete
  2. Thanks for sharing this informative content. It’s really useful and well-explained. I also found training courses in Chennai quite helpful for career growth. Helpful information about best guest posting sites.

    ReplyDelete