[][src]Struct selenium_webdriver::ChromeOptions

pub struct ChromeOptions { /* fields omitted */ }

Utility struct to adjust the chrome browser session

For more info pls check the chromedriver docs at https://chromedriver.chromium.org/capabilities

Implementations

impl ChromeOptions[src]

pub fn new() -> Self[src]

pub fn add_args(&mut self, args: Vec<&str>) -> &mut Self[src]

List of arguments to be passed to the Chrome browser on launch

Examples

let args = vec!["--headless","--window-size=800,600"];
let mut ch = ChromeOptions::new();
ch.add_args(args);

pub fn add_binary(&mut self, path: &str) -> &mut Self[src]

Path to chrome executable

pub fn add_extensions(&mut self, extensions: Vec<&str>) -> &mut Self[src]

Each item in the vec should be a base-64 encoded packed Chrome extension (.crx)

pub fn add_local_state(&mut self, local_state: HashMap<&str, &str>) -> &mut Self[src]

Local state preferences' names and values.

pub fn add_prefs(&mut self, prefs: HashMap<&str, &str>) -> &mut Self[src]

User profile preferences' names and values.

pub fn add_detach(&mut self, detach: bool) -> &mut Self[src]

If false, Chrome will be quit when ChromeDriver is killed even if the session is still active

pub fn add_debugger_address(&mut self, address: &str) -> &mut Self[src]

An address of a Chrome debugger server to connect to, for example, e.g. "127.0.0.1:38947"

pub fn add_exclude_switches(&mut self, switches: Vec<&str>) -> &mut Self[src]

List of Chrome command line switches to exclude

pub fn add_minidump_path(&mut self, path: &str) -> &mut Self[src]

Only for Linux. Directory to store Chrome minidumps

pub fn add_mobile_emulation(&mut self, device: MobileDevice) -> &mut Self[src]

See the MobileDevice struct for more info

pub fn add_perf_logging_prefs(&mut self, prefs: PerfLoggingPrefs) -> &mut Self[src]

Pls check chromedriver docs for more info

pub fn add_window_types(&mut self, window_types: Vec<&str>) -> &mut Self[src]

A list of window types that will appear in the list of window handles.

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.