Exception : An exception is
an event, which occurs during the execution of a program, that disrupts the
normal flow of the program's instructions.
Description: When an error
occurs within a method, the method creates an object and hands it off to the runtime
system. The object, called an exception object, contains information about
the error, including its type and the state of the program when the error
occurred. Creating an exception object and handing it to the runtime system is
called throwing an exception.
After a method throws an exception, the runtime system attempts to
find something to handle it. The set of possible "somethings" to
handle the exception is the ordered list of methods that had been called to get
to the method where the error occurred.
- java.lang.Object
- java.lang.Throwable
-
java.lang.Exception
-
java.lang.RuntimeException
-
org.openqa.selenium.WebDriverException
- NoSuchElementException : FindBy method can’t find the element.
- NoSuchFrameException:This Exception occurs when the driver is switching to an invalid frame, which is not available.
- NoSuchWindowException:This Exception occurs when the driver is switching to an invalid Window, which is not available
- NoAlertPresentException:This Exception occurs when the driver is switching to an invalid Alert, which is not available.
- StaleElementReferenceException : This tells that element is no longer appearing on the DOM page.
- TimeoutException: This tells that the execution is failed because the command did not complete in enough time.
- ElementNotVisibleException: Thrown to indicate that although an element is present on the DOM, it is not visible, and so is not able to be interacted withHidden Elements, which has presence in DOM and it, is not visible. Visibility means the height and width should be greater than zero. Hidden Elements are defined in HTML using of type=”hidden”.
- ElementNotSelectableException: Thrown to indicate that may be the element is disabled, and so is not able to select.
- SessionNotFoundException:This Exception occurs when the driver is performing the action after immediately quitting the browser
- WebDriverException:This Exception occurs when the driver is performing the action after immediately closing the browser
- InvalidElementState : An element command could not be completed because the element is in an invalid state (e.g. attempting to click a disabled element).
- UnknownError : An unknown server-side error occurred while processing the command.
- JavaScriptError : An error occurred while executing JavaScript code.
- XPathLookupError : An error occurred while searching for an element by XPath.
- UnknownCommand : The requested resource could not be found, or a request was received using an HTTP method that is not supported by the mapped resource.
- firefox.NotConnectedException: Occurs when Firefox browser upgraded with new version.
- InvalidCoordinatesException-Indicates that the coordinates provided to an interactions operation are invalid
- UnhandledAlertException-When User tries to access an alert when it is not present
- MoveTargetOutOfBoundsException-Indicates that the target provided to the actions move() method is invalid - outside of the size of the window.
- UnsupportedCommandException-Used to indicate that a command used by the remote webdriver is unsupported.
- UnreachableBrowserException-Problem with connection to browser due to closing of browser or invalid remote server address
- UnableToSetCookieException-Thrown when a driver fails to set a cookie.
- InvalidCookieDomainException-Thrown when attempting to add a cookie under a different domain than the current URL.
- NoSuchSessionException-Thrown by any command being called after WebDriver.quit().
- InvalidElementStateException-Indicates that a WebElement is in a state that means actions cannot be performed with it
1 Comments
ReplyDeleteI have been searching for a useful post like this on salesforce course details, it is highly helpful for me and I have a great experience with this Salesforce Training who are providing certification and job assistance. Salesforce course in Gurgaon