Enum fantoccini::error::CmdError [] [src]

pub enum CmdError {
    Standard(WebDriverError),
    NoSuchElement(WebDriverError),
    BadUrl(ParseError),
    Failed(Error),
    Lost(IOError),
    NotJson(String),
    Json(ParserError),
    NotW3C(Json),
}

An error occurred while executing some browser action.

Variants

A standard WebDriver error occurred.

See the spec for details about what each of these errors represent. Note that for convenience NoSuchElement has been extracted into its own top-level variant.

No element was found matching the given locator.

This variant lifts the "no such element" error variant from Standard to simplify checking for it in user code.

A bad URL was encountered during parsing.

This normally happens if a link is clicked or the current URL is requested, but the URL in question is invalid or otherwise malformed.

A request to the WebDriver server failed.

The connection to the WebDriver server was lost.

The WebDriver server responded with a non-standard, non-JSON reply.

The WebDriver server responded to a command with an invalid JSON response.

The WebDriver server produced a response that does not conform to the W3C WebDriver specification.

Note: if you are trying to use phantomjs or chromedriver, note that these WebDriver implementations do not conform to the spec at this time. For example, chromedriver does not place sessionId for NewSession or errors under the value key in responses, and does not correctly encode and decode WebElement references.

Methods

impl CmdError
[src]

Returns true if this error indicates that a matching element was not found.

Equivalent to rust,ignore let is_miss = if let CmdError::NoSuchElement(..) = e { true } else { false };

Trait Implementations

impl Debug for CmdError
[src]

Formats the value using the given formatter.

impl Error for CmdError
[src]

A short description of the error. Read more

The lower-level cause of this error, if any. Read more

impl Display for CmdError
[src]

Formats the value using the given formatter. Read more

impl From<IOError> for CmdError
[src]

Performs the conversion.

impl From<ParseError> for CmdError
[src]

Performs the conversion.

impl From<Error> for CmdError
[src]

Performs the conversion.

impl From<WebDriverError> for CmdError
[src]

Performs the conversion.

impl From<ParserError> for CmdError
[src]

Performs the conversion.