pub struct FirefoxOptions { /* private fields */ }
Expand description
Utility struct to adjust the firefox browser session
For more info on FF Options please check https://developer.mozilla.org/en-US/docs/Web/WebDriver/Capabilities/firefoxOptions
Implementations§
Source§impl FirefoxOptions
impl FirefoxOptions
pub fn new() -> Self
Sourcepub fn add_binary(&mut self, path: &str) -> &mut Self
pub fn add_binary(&mut self, path: &str) -> &mut Self
Absolute path to the custom Firefox binary to use.
Sourcepub fn add_args(&mut self, args: Vec<&str>) -> &mut Self
pub fn add_args(&mut self, args: Vec<&str>) -> &mut Self
More info on the FF args here: https://developer.mozilla.org/en-US/docs/Mozilla/Command_Line_Options?redirectlocale=en-US&redirectslug=Command_Line_Options
Sourcepub fn add_prefs(&mut self, prefs: &str) -> &mut Self
pub fn add_prefs(&mut self, prefs: &str) -> &mut Self
As there are various prefs types, this methods takes a string representation of json.
§Examples
let mut ff = FirefoxOptions::new();
let prefs = r#"{dom.ipc.processCount": 8,"javascript.options.showInConsole": false}"#;
ff.add_prefs(prefs);
Auto Trait Implementations§
impl Freeze for FirefoxOptions
impl RefUnwindSafe for FirefoxOptions
impl Send for FirefoxOptions
impl Sync for FirefoxOptions
impl Unpin for FirefoxOptions
impl UnwindSafe for FirefoxOptions
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more