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§
Sourcefn _get(&self, key: &str) -> Option<&Value>
fn _get(&self, key: &str) -> Option<&Value>
Get an immutable reference to the underlying serde_json::Value.
Sourcefn _get_mut(&mut self, key: &str) -> Option<&mut Value>
fn _get_mut(&mut self, key: &str) -> Option<&mut Value>
Get a mutable reference to the underlying serde_json::Value.
fn _set(&mut self, key: String, value: Value)
Provided Methods§
Sourcefn add<T>(&mut self, key: &str, value: T) -> WebDriverResult<()>where
T: Serialize,
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.
Sourcefn add_subkey<T>(
&mut self,
key: &str,
subkey: &str,
value: T,
) -> WebDriverResult<()>where
T: Serialize,
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.
Sourcefn remove_subkey(&mut self, key: &str, subkey: &str) -> WebDriverResult<()>
fn remove_subkey(&mut self, key: &str, subkey: &str) -> WebDriverResult<()>
Remove a subkey from the specified key, if it exists.
Sourcefn update(&mut self, key: &str, value: Value)
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.
Sourcefn set_version(&mut self, version: &str) -> WebDriverResult<()>
fn set_version(&mut self, version: &str) -> WebDriverResult<()>
Set the desired browser version.
Sourcefn set_platform(&mut self, platform: &str) -> WebDriverResult<()>
fn set_platform(&mut self, platform: &str) -> WebDriverResult<()>
Set the desired browser platform.
Sourcefn set_javascript_enabled(&mut self, enabled: bool) -> WebDriverResult<()>
fn set_javascript_enabled(&mut self, enabled: bool) -> WebDriverResult<()>
Set whether the session supports executing user-supplied Javascript.
Sourcefn set_database_enabled(&mut self, enabled: bool) -> WebDriverResult<()>
fn set_database_enabled(&mut self, enabled: bool) -> WebDriverResult<()>
Set whether the session can interact with database storage.
Sourcefn set_location_context_enabled(&mut self, enabled: bool) -> WebDriverResult<()>
fn set_location_context_enabled(&mut self, enabled: bool) -> WebDriverResult<()>
Set whether the session can set and query the browser’s location context.
Sourcefn set_application_cache_enabled(
&mut self,
enabled: bool,
) -> WebDriverResult<()>
fn set_application_cache_enabled( &mut self, enabled: bool, ) -> WebDriverResult<()>
Set whether the session can interact with the application cache.
Sourcefn set_browser_connection_enabled(
&mut self,
enabled: bool,
) -> WebDriverResult<()>
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.
Sourcefn set_web_storage_enabled(&mut self, enabled: bool) -> WebDriverResult<()>
fn set_web_storage_enabled(&mut self, enabled: bool) -> WebDriverResult<()>
Set whether the session supports interactions with local storage.
Sourcefn accept_ssl_certs(&mut self, enabled: bool) -> WebDriverResult<()>
fn accept_ssl_certs(&mut self, enabled: bool) -> WebDriverResult<()>
Set whether the session should accept all SSL certificates by default.
Sourcefn set_rotatable(&mut self, enabled: bool) -> WebDriverResult<()>
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.
Sourcefn set_native_events(&mut self, enabled: bool) -> WebDriverResult<()>
fn set_native_events(&mut self, enabled: bool) -> WebDriverResult<()>
Set whether the session is capable of generating native events when simulating user input.
Sourcefn set_proxy(&mut self, proxy: Proxy) -> WebDriverResult<()>
fn set_proxy(&mut self, proxy: Proxy) -> WebDriverResult<()>
Set the proxy to use.
Sourcefn set_unexpected_alert_behaviour(
&mut self,
behaviour: AlertBehaviour,
) -> WebDriverResult<()>
fn set_unexpected_alert_behaviour( &mut self, behaviour: AlertBehaviour, ) -> WebDriverResult<()>
Set the behaviour to be followed when an unexpected alert is encountered.
Sourcefn set_element_scroll_behaviour(
&mut self,
behaviour: ScrollBehaviour,
) -> WebDriverResult<()>
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.
Sourcefn handles_alerts(&self) -> Option<bool>
fn handles_alerts(&self) -> Option<bool>
Get whether the session can interact with modal popups such as window.alert
.
Sourcefn css_selectors_enabled(&self) -> Option<bool>
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.