Trait webdriver::capabilities::BrowserCapabilities[][src]

pub trait BrowserCapabilities {
    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 accept_proxy(
        &mut self,
        proxy_settings: &Map<String, Value>,
        _: &Capabilities
    ) -> WebDriverResult<bool>;
fn validate_custom(&self, name: &str, value: &Value) -> WebDriverResult<()>;
fn accept_custom(
        &mut self,
        name: &str,
        value: &Value,
        merged: &Capabilities
    ) -> WebDriverResult<bool>; }

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

Set up the Capabilites object

Typically used to create any internal caches

Name of the browser

Version number of the browser

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.

Name of the platform/OS

Whether insecure certificates are supported

Indicates whether driver supports all of the window resizing and repositioning commands.

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.

Check if custom properties are accepted capabilites

Check that custom properties containing ":" are compatible with the implementation.

Implementors