thirtyfour::common::capabilities::desiredcapabilities

Trait CapabilitiesHelper

Source
pub trait CapabilitiesHelper {
Show 23 methods // Required methods fn _get(&self, key: &str) -> Option<&Value>; fn _get_mut(&mut self, key: &str) -> Option<&mut Value>; fn _set(&mut self, key: String, value: Value); // Provided methods fn add<T>(&mut self, key: &str, value: T) -> WebDriverResult<()> where T: Serialize { ... } fn add_subkey<T>( &mut self, key: &str, subkey: &str, value: T, ) -> WebDriverResult<()> where T: Serialize { ... } fn remove_subkey(&mut self, key: &str, subkey: &str) -> WebDriverResult<()> { ... } fn update(&mut self, key: &str, value: Value) { ... } fn set_version(&mut self, version: &str) -> WebDriverResult<()> { ... } fn set_platform(&mut self, platform: &str) -> WebDriverResult<()> { ... } fn set_javascript_enabled(&mut self, enabled: bool) -> WebDriverResult<()> { ... } fn set_database_enabled(&mut self, enabled: bool) -> WebDriverResult<()> { ... } fn set_location_context_enabled( &mut self, enabled: bool, ) -> WebDriverResult<()> { ... } fn set_application_cache_enabled( &mut self, enabled: bool, ) -> WebDriverResult<()> { ... } fn set_browser_connection_enabled( &mut self, enabled: bool, ) -> WebDriverResult<()> { ... } fn set_web_storage_enabled(&mut self, enabled: bool) -> WebDriverResult<()> { ... } fn accept_ssl_certs(&mut self, enabled: bool) -> WebDriverResult<()> { ... } fn set_rotatable(&mut self, enabled: bool) -> WebDriverResult<()> { ... } fn set_native_events(&mut self, enabled: bool) -> WebDriverResult<()> { ... } fn set_proxy(&mut self, proxy: Proxy) -> WebDriverResult<()> { ... } fn set_unexpected_alert_behaviour( &mut self, behaviour: AlertBehaviour, ) -> WebDriverResult<()> { ... } fn set_element_scroll_behaviour( &mut self, behaviour: ScrollBehaviour, ) -> WebDriverResult<()> { ... } fn handles_alerts(&self) -> Option<bool> { ... } fn css_selectors_enabled(&self) -> Option<bool> { ... }
}

Required Methods§

Source

fn _get(&self, key: &str) -> Option<&Value>

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

Source

fn _get_mut(&mut self, key: &str) -> Option<&mut Value>

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

Source

fn _set(&mut self, key: String, value: Value)

Provided Methods§

Source

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

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

Source

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

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

Source

fn remove_subkey(&mut self, key: &str, subkey: &str) -> WebDriverResult<()>

Remove a subkey from the specified key, if it exists.

Source

fn update(&mut self, key: &str, value: Value)

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

Source

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

Set the desired browser version.

Source

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

Set the desired browser platform.

Source

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

Set whether the session supports executing user-supplied Javascript.

Source

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

Set whether the session can interact with database storage.

Source

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

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

Source

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

Set whether the session can interact with the application cache.

Source

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

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

Source

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

Set whether the session supports interactions with local storage.

Source

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

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

Source

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

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

Source

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

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

Source

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

Set the proxy to use.

Source

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

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

Source

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

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.

Source

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

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

Source

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

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

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§