[][src]Trait thirtyfour_sync::Capabilities

pub trait Capabilities {
    fn get(&self) -> &Value;
fn get_mut(&mut self) -> &mut Value; fn add<T>(&mut self, key: &str, value: T) -> Result<(), WebDriverError>
    where
        T: Serialize
, { ... }
fn add_subkey<T>(
        &mut self,
        key: &str,
        subkey: &str,
        value: T
    ) -> Result<(), WebDriverError>
    where
        T: Serialize
, { ... }
fn update(&mut self, value: Value) { ... }
fn set_version(&mut self, version: &str) -> Result<(), WebDriverError> { ... }
fn set_platform(&mut self, platform: &str) -> Result<(), WebDriverError> { ... }
fn set_javascript_enabled(
        &mut self,
        enabled: bool
    ) -> Result<(), WebDriverError> { ... }
fn set_database_enabled(
        &mut self,
        enabled: bool
    ) -> Result<(), WebDriverError> { ... }
fn set_location_context_enabled(
        &mut self,
        enabled: bool
    ) -> Result<(), WebDriverError> { ... }
fn set_application_cache_enabled(
        &mut self,
        enabled: bool
    ) -> Result<(), WebDriverError> { ... }
fn set_browser_connection_enabled(
        &mut self,
        enabled: bool
    ) -> Result<(), WebDriverError> { ... }
fn set_web_storage_enabled(
        &mut self,
        enabled: bool
    ) -> Result<(), WebDriverError> { ... }
fn accept_ssl_certs(&mut self, enabled: bool) -> Result<(), WebDriverError> { ... }
fn set_rotatable(&mut self, enabled: bool) -> Result<(), WebDriverError> { ... }
fn set_native_events(&mut self, enabled: bool) -> Result<(), WebDriverError> { ... }
fn set_proxy(&mut self, proxy: Proxy) -> Result<(), WebDriverError> { ... }
fn set_unexpected_alert_behaviour(
        &mut self,
        behaviour: AlertBehaviour
    ) -> Result<(), WebDriverError> { ... }
fn set_element_scroll_behaviour(
        &mut self,
        behaviour: ScrollBehaviour
    ) -> Result<(), WebDriverError> { ... }
fn handles_alerts(&self) -> Option<bool> { ... }
fn css_selectors_enabled(&self) -> Option<bool> { ... } }

Required methods

fn get(&self) -> &Value

Get an immutable reference to the underlying serde_json::Value.

fn get_mut(&mut self) -> &mut Value

Get a mutable reference to the underlying serde_json::Value.

Loading content...

Provided methods

fn add<T>(&mut self, key: &str, value: T) -> Result<(), WebDriverError> where
    T: Serialize

Add any Serialize-able object to the capabilities under the specified key.

fn add_subkey<T>(
    &mut self,
    key: &str,
    subkey: &str,
    value: T
) -> Result<(), WebDriverError> where
    T: Serialize

Add any Serialize-able object to the capabilities under the specified key and subkey.

fn update(&mut self, value: Value)

Add all keys of the specified object into the capabilities, overwriting any matching keys that already exist.

fn set_version(&mut self, version: &str) -> Result<(), WebDriverError>

Set the desired browser version.

fn set_platform(&mut self, platform: &str) -> Result<(), WebDriverError>

Set the desired browser platform.

fn set_javascript_enabled(
    &mut self,
    enabled: bool
) -> Result<(), WebDriverError>

Set whether the session supports executing user-supplied Javascript.

fn set_database_enabled(&mut self, enabled: bool) -> Result<(), WebDriverError>

Set whether the session can interact with database storage.

fn set_location_context_enabled(
    &mut self,
    enabled: bool
) -> Result<(), WebDriverError>

Set whether the session can set and query the browser's location context.

fn set_application_cache_enabled(
    &mut self,
    enabled: bool
) -> Result<(), WebDriverError>

Set whether the session can interact with the application cache.

fn set_browser_connection_enabled(
    &mut self,
    enabled: bool
) -> Result<(), WebDriverError>

Set whether the session can query for the browser's connectivity and disable it if desired.

fn set_web_storage_enabled(
    &mut self,
    enabled: bool
) -> Result<(), WebDriverError>

Set whether the session supports interactions with local storage.

fn accept_ssl_certs(&mut self, enabled: bool) -> Result<(), WebDriverError>

Set whether the session should accept all SSL certificates by default.

fn set_rotatable(&mut self, enabled: bool) -> Result<(), WebDriverError>

Set whether the session can rotate the current page's layout between portrait and landscape orientations. Only applies to mobile platforms.

fn set_native_events(&mut self, enabled: bool) -> Result<(), WebDriverError>

Set whether the session is capable of generating native events when simulating user input.

fn set_proxy(&mut self, proxy: Proxy) -> Result<(), WebDriverError>

Set the proxy to use.

fn set_unexpected_alert_behaviour(
    &mut self,
    behaviour: AlertBehaviour
) -> Result<(), WebDriverError>

Set the behaviour to be followed when an unexpected alert is encountered.

fn set_element_scroll_behaviour(
    &mut self,
    behaviour: ScrollBehaviour
) -> Result<(), WebDriverError>

Set whether elements are scrolled into the viewport for interation to align with the top or the bottom of the viewport. The default is to align with the top.

fn handles_alerts(&self) -> Option<bool>

Get whether the session can interact with modal popups such as window.alert.

fn css_selectors_enabled(&self) -> Option<bool>

Get whether the session supports CSS selectors when searching for elements.

Loading content...

Implementors

impl Capabilities for DesiredCapabilities[src]

Add generic Capabilities implementation. This can be used as a convenient way to interact with the returned capabilities from a WebDriver instance, or as a way to construct a custom capabilities JSON struct.

impl Capabilities for ChromeCapabilities[src]

impl Capabilities for EdgeCapabilities[src]

impl Capabilities for FirefoxCapabilities[src]

impl Capabilities for InternetExplorerCapabilities[src]

impl Capabilities for OperaCapabilities[src]

impl Capabilities for SafariCapabilities[src]

Loading content...