Most Common Exceptions Which We Notice In Selenium WebDriver.


We always face the Exceptions while automating.Lets see few Exceptions and what’s the Reason !!!! This post helps you memorize the exceptions which you have been facing.

Why Am I Facing Exceptions ??? And How To Handle These ??
Why Am I Facing Exceptions ??? And How To Handle These ??

NoSuchElement : An element could not be located on the page using the given search parameters.

NoSuchFrame : A request to switch to a frame could not be satisfied because the frame could not be found.

StaleElementReference : An element command failed because the referenced element is no longer attached to the DOM.

Firefox Not Connected : Firefox browser upgraded toop new version.

ElementIsNotSelectable : An attempt was made to select an element that cannot be selected.

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.

ElementNotVisible : An element command could not be completed because the element is not visible on the page.

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.

Timeout : An operation did not complete before its timeout expired.

NoSuchWindow : A request to switch to a different window could not be satisfied because the window could not be found.

InvalidCookieDomain : An illegal attempt was made to set a cookie under a different domain than the current page.

UnableToSetCookie : A request to set a cookie’s value could not be satisfied.

UnexpectedAlertOpen : A modal dialog was open, blocking this operation

NoAlertOpenError : An attempt was made to operate on a modal dialog when one was not open.

ScriptTimeout : A script did not complete before its timeout expired.

InvalidElementCoordinates : The coordinates provided to an interactions operation are invalid.

IMENotAvailable : IME was not available.
IMEEngineActivationFailed : An IME engine could not be started.

InvalidSelector : Argument was an invalid selector (e.g. XPath/CSS).

Hope this post helps you guys…! And Please Correct me if there is something to be added…! ;)

Advertisements

6 thoughts on “Most Common Exceptions Which We Notice In Selenium WebDriver.

  1. Anonymous July 2, 2015 / 9:31 pm

    ;)

    Like

  2. varsha April 19, 2016 / 3:04 am

    can you please expand on UnknownCommand exception with respect to HTTP method

    Like

  3. Ho Nguyen October 4, 2016 / 11:42 am

    Hello Hari,

    Do we have specific way to handle particular exceptions above?

    Like

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s