#[non_exhaustive]pub enum CmdError {
Standard(WebDriver),
BadUrl(ParseError),
Failed(Error),
FailedC(Error),
Lost(Error),
NotJson(String),
Json(Error),
NotW3C(Value),
InvalidArgument(String, String),
ImageDecodeError(DecodeError),
PdfDecodeError(DecodeError),
WaitTimeout,
}Expand description
An error occurred while executing some browser action.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Standard(WebDriver)
A standard WebDriver error occurred.
See the spec for details about what each of these errors represent.
BadUrl(ParseError)
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.
Failed(Error)
A request to the WebDriver server failed.
FailedC(Error)
A request to the WebDriver server failed (error in hyper_util’s legacy client).
Lost(Error)
The connection to the WebDriver server was lost.
NotJson(String)
The WebDriver server responded with a non-standard, non-JSON reply.
Json(Error)
The WebDriver server responded to a command with an invalid JSON response.
NotW3C(Value)
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.
InvalidArgument(String, String)
A function was invoked with an invalid argument.
ImageDecodeError(DecodeError)
Could not decode a base64 image
PdfDecodeError(DecodeError)
Could not decode a base64 PDF.
WaitTimeout
Timeout of a wait condition.
When waiting for a for a condition using Client::wait, any of the
consuming methods, waiting on some condition, may return this error, indicating that the
timeout waiting for the condition occurred.
Implementations§
Source§impl CmdError
impl CmdError
Sourcepub fn is_detached_shadow_root(&self) -> bool
pub fn is_detached_shadow_root(&self) -> bool
Return true if this error matches
ErrorStatus::DetachedShadowRoot.
Sourcepub fn is_element_not_interactable(&self) -> bool
pub fn is_element_not_interactable(&self) -> bool
Return true if this error matches
ErrorStatus::ElementNotInteractable.
Sourcepub fn is_element_not_selectable(&self) -> bool
pub fn is_element_not_selectable(&self) -> bool
Return true if this error matches
ErrorStatus::ElementNotSelectable.
Sourcepub fn is_insecure_certificate(&self) -> bool
pub fn is_insecure_certificate(&self) -> bool
Return true if this error matches
ErrorStatus::InsecureCertificate.
Sourcepub fn is_invalid_argument(&self) -> bool
pub fn is_invalid_argument(&self) -> bool
Return true if this error matches
ErrorStatus::InvalidArgument.
Return true if this error matches
ErrorStatus::InvalidCookieDomain.
Sourcepub fn is_invalid_coordinates(&self) -> bool
pub fn is_invalid_coordinates(&self) -> bool
Return true if this error matches
ErrorStatus::InvalidCoordinates.
Sourcepub fn is_invalid_element_state(&self) -> bool
pub fn is_invalid_element_state(&self) -> bool
Return true if this error matches
ErrorStatus::InvalidElementState.
Sourcepub fn is_invalid_selector(&self) -> bool
pub fn is_invalid_selector(&self) -> bool
Return true if this error matches
ErrorStatus::InvalidSelector.
Sourcepub fn is_invalid_session_id(&self) -> bool
pub fn is_invalid_session_id(&self) -> bool
Return true if this error matches
ErrorStatus::InvalidSessionId.
Sourcepub fn is_javascript_error(&self) -> bool
pub fn is_javascript_error(&self) -> bool
Return true if this error matches
ErrorStatus::JavascriptError.
Sourcepub fn is_move_target_out_of_bounds(&self) -> bool
pub fn is_move_target_out_of_bounds(&self) -> bool
Return true if this error matches
ErrorStatus::MoveTargetOutOfBounds.
Sourcepub fn is_no_such_alert(&self) -> bool
pub fn is_no_such_alert(&self) -> bool
Return true if this error matches
ErrorStatus::NoSuchAlert.
Return true if this error matches
ErrorStatus::NoSuchCookie.
Sourcepub fn is_no_such_element(&self) -> bool
pub fn is_no_such_element(&self) -> bool
Return true if this error matches
ErrorStatus::NoSuchElement.
Sourcepub fn is_no_such_frame(&self) -> bool
pub fn is_no_such_frame(&self) -> bool
Return true if this error matches
ErrorStatus::NoSuchFrame.
Sourcepub fn is_no_such_shadow_root(&self) -> bool
pub fn is_no_such_shadow_root(&self) -> bool
Return true if this error matches
ErrorStatus::NoSuchShadowRoot.
Sourcepub fn is_no_such_window(&self) -> bool
pub fn is_no_such_window(&self) -> bool
Return true if this error matches
ErrorStatus::NoSuchWindow.
Sourcepub fn is_script_timeout(&self) -> bool
pub fn is_script_timeout(&self) -> bool
Return true if this error matches
ErrorStatus::ScriptTimeout.
Sourcepub fn is_session_not_created(&self) -> bool
pub fn is_session_not_created(&self) -> bool
Return true if this error matches
ErrorStatus::SessionNotCreated.
Sourcepub fn is_stale_element_reference(&self) -> bool
pub fn is_stale_element_reference(&self) -> bool
Return true if this error matches
ErrorStatus::StaleElementReference.
Sourcepub fn is_timeout(&self) -> bool
pub fn is_timeout(&self) -> bool
Return true if this error matches
ErrorStatus::Timeout.
Sourcepub fn is_unable_to_capture_screen(&self) -> bool
pub fn is_unable_to_capture_screen(&self) -> bool
Return true if this error matches
ErrorStatus::UnableToCaptureScreen.
Return true if this error matches
ErrorStatus::UnableToSetCookie.
Sourcepub fn is_unexpected_alert_open(&self) -> bool
pub fn is_unexpected_alert_open(&self) -> bool
Return true if this error matches
ErrorStatus::UnexpectedAlertOpen.
Sourcepub fn is_unknown_command(&self) -> bool
pub fn is_unknown_command(&self) -> bool
Return true if this error matches
ErrorStatus::UnknownCommand.
Sourcepub fn is_unknown_error(&self) -> bool
pub fn is_unknown_error(&self) -> bool
Return true if this error matches
ErrorStatus::UnknownError.
Sourcepub fn is_unknown_method(&self) -> bool
pub fn is_unknown_method(&self) -> bool
Return true if this error matches
ErrorStatus::UnknownMethod.
Sourcepub fn is_unknown_path(&self) -> bool
pub fn is_unknown_path(&self) -> bool
Return true if this error matches
ErrorStatus::UnknownPath.
Sourcepub fn is_unsupported_operation(&self) -> bool
pub fn is_unsupported_operation(&self) -> bool
Return true if this error matches
ErrorStatus::UnsupportedOperation.
Trait Implementations§
Source§impl Error for CmdError
impl Error for CmdError
Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()
Source§fn cause(&self) -> Option<&dyn Error>
fn cause(&self) -> Option<&dyn Error>
replaced by Error::source, which can support downcasting