Trait webdriver::capabilities::BrowserCapabilities
source · pub trait BrowserCapabilities {
Show 17 methods
// Required methods
fn init(&mut self, _: &Capabilities);
fn browser_name(
&mut self,
_: &Capabilities,
) -> WebDriverResult<Option<String>>;
fn browser_version(
&mut self,
_: &Capabilities,
) -> WebDriverResult<Option<String>>;
fn compare_browser_version(
&mut self,
version: &str,
comparison: &str,
) -> WebDriverResult<bool>;
fn platform_name(
&mut self,
_: &Capabilities,
) -> WebDriverResult<Option<String>>;
fn accept_insecure_certs(
&mut self,
_: &Capabilities,
) -> WebDriverResult<bool>;
fn set_window_rect(&mut self, _: &Capabilities) -> WebDriverResult<bool>;
fn strict_file_interactability(
&mut self,
_: &Capabilities,
) -> WebDriverResult<bool>;
fn web_socket_url(&mut self, _: &Capabilities) -> WebDriverResult<bool>;
fn webauthn_virtual_authenticators(
&mut self,
_: &Capabilities,
) -> WebDriverResult<bool>;
fn webauthn_extension_uvm(
&mut self,
_: &Capabilities,
) -> WebDriverResult<bool>;
fn webauthn_extension_prf(
&mut self,
_: &Capabilities,
) -> WebDriverResult<bool>;
fn webauthn_extension_large_blob(
&mut self,
_: &Capabilities,
) -> WebDriverResult<bool>;
fn webauthn_extension_cred_blob(
&mut self,
_: &Capabilities,
) -> WebDriverResult<bool>;
fn accept_proxy(
&mut self,
proxy_settings: &Map<String, Value>,
_: &Capabilities,
) -> WebDriverResult<bool>;
fn validate_custom(
&mut self,
name: &str,
value: &Value,
) -> WebDriverResult<()>;
fn accept_custom(
&mut self,
name: &str,
value: &Value,
merged: &Capabilities,
) -> WebDriverResult<bool>;
}
Expand description
Trait for objects that can be used to inspect browser capabilities
The main methods in this trait are called with a Capabilites object resulting from a full set of potential capabilites for the session. Given those Capabilities they return a property of the browser instance that would be initiated. In many cases this will be independent of the input, but in the case of e.g. browser version, it might depend on a path to the binary provided as a capability.
Required Methods§
sourcefn init(&mut self, _: &Capabilities)
fn init(&mut self, _: &Capabilities)
Set up the Capabilites object
Typically used to create any internal caches
sourcefn browser_name(&mut self, _: &Capabilities) -> WebDriverResult<Option<String>>
fn browser_name(&mut self, _: &Capabilities) -> WebDriverResult<Option<String>>
Name of the browser
sourcefn browser_version(
&mut self,
_: &Capabilities,
) -> WebDriverResult<Option<String>>
fn browser_version( &mut self, _: &Capabilities, ) -> WebDriverResult<Option<String>>
Version number of the browser
sourcefn compare_browser_version(
&mut self,
version: &str,
comparison: &str,
) -> WebDriverResult<bool>
fn compare_browser_version( &mut self, version: &str, comparison: &str, ) -> WebDriverResult<bool>
Compare actual browser version to that provided in a version specifier
Parameters are the actual browser version and the comparison string, respectively. The format of the comparison string is implementation-defined.
sourcefn platform_name(&mut self, _: &Capabilities) -> WebDriverResult<Option<String>>
fn platform_name(&mut self, _: &Capabilities) -> WebDriverResult<Option<String>>
Name of the platform/OS
sourcefn accept_insecure_certs(&mut self, _: &Capabilities) -> WebDriverResult<bool>
fn accept_insecure_certs(&mut self, _: &Capabilities) -> WebDriverResult<bool>
Whether insecure certificates are supported
sourcefn set_window_rect(&mut self, _: &Capabilities) -> WebDriverResult<bool>
fn set_window_rect(&mut self, _: &Capabilities) -> WebDriverResult<bool>
Indicates whether driver supports all of the window resizing and repositioning commands.
sourcefn strict_file_interactability(
&mut self,
_: &Capabilities,
) -> WebDriverResult<bool>
fn strict_file_interactability( &mut self, _: &Capabilities, ) -> WebDriverResult<bool>
Indicates that interactability checks will be applied to <input type=file>
.
sourcefn web_socket_url(&mut self, _: &Capabilities) -> WebDriverResult<bool>
fn web_socket_url(&mut self, _: &Capabilities) -> WebDriverResult<bool>
Whether a WebSocket URL for the created session has to be returned
sourcefn webauthn_virtual_authenticators(
&mut self,
_: &Capabilities,
) -> WebDriverResult<bool>
fn webauthn_virtual_authenticators( &mut self, _: &Capabilities, ) -> WebDriverResult<bool>
Indicates whether the endpoint node supports all Virtual Authenticators commands.
sourcefn webauthn_extension_uvm(&mut self, _: &Capabilities) -> WebDriverResult<bool>
fn webauthn_extension_uvm(&mut self, _: &Capabilities) -> WebDriverResult<bool>
Indicates whether the endpoint node WebAuthn WebDriver implementation supports the User Verification Method extension.
sourcefn webauthn_extension_prf(&mut self, _: &Capabilities) -> WebDriverResult<bool>
fn webauthn_extension_prf(&mut self, _: &Capabilities) -> WebDriverResult<bool>
Indicates whether the endpoint node WebAuthn WebDriver implementation supports the prf extension.
sourcefn webauthn_extension_large_blob(
&mut self,
_: &Capabilities,
) -> WebDriverResult<bool>
fn webauthn_extension_large_blob( &mut self, _: &Capabilities, ) -> WebDriverResult<bool>
Indicates whether the endpoint node WebAuthn WebDriver implementation supports the largeBlob extension.
sourcefn webauthn_extension_cred_blob(
&mut self,
_: &Capabilities,
) -> WebDriverResult<bool>
fn webauthn_extension_cred_blob( &mut self, _: &Capabilities, ) -> WebDriverResult<bool>
Indicates whether the endpoint node WebAuthn WebDriver implementation supports the credBlob extension.
fn accept_proxy( &mut self, proxy_settings: &Map<String, Value>, _: &Capabilities, ) -> WebDriverResult<bool>
sourcefn validate_custom(&mut self, name: &str, value: &Value) -> WebDriverResult<()>
fn validate_custom(&mut self, name: &str, value: &Value) -> WebDriverResult<()>
Type check custom properties
Check that custom properties containing “:” have the correct data types. Properties that are unrecognised must be ignored i.e. return without error.
sourcefn accept_custom(
&mut self,
name: &str,
value: &Value,
merged: &Capabilities,
) -> WebDriverResult<bool>
fn accept_custom( &mut self, name: &str, value: &Value, merged: &Capabilities, ) -> WebDriverResult<bool>
Check if custom properties are accepted capabilites
Check that custom properties containing “:” are compatible with the implementation.