Struct thirtyfour::common::capabilities::chrome::ChromeCapabilities
source · [−]pub struct ChromeCapabilities { /* private fields */ }
Implementations
sourceimpl ChromeCapabilities
impl ChromeCapabilities
sourcepub fn add_chrome_option<T>(&mut self, key: &str, value: T) -> WebDriverResult<()> where
T: Serialize,
pub fn add_chrome_option<T>(&mut self, key: &str, value: T) -> WebDriverResult<()> where
T: Serialize,
Add the specified Chrome option. This is a helper method for add_chrome_arg()
.
sourcepub fn get_chrome_option<T>(&self, key: &str) -> T where
T: DeserializeOwned + Default,
pub fn get_chrome_option<T>(&self, key: &str) -> T where
T: DeserializeOwned + Default,
Get the specified Chrome option.
sourcepub fn get_args(&self) -> Vec<String>ⓘNotable traits for Vec<u8, A>impl<A> Write for Vec<u8, A> where
A: Allocator,
pub fn get_args(&self) -> Vec<String>ⓘNotable traits for Vec<u8, A>impl<A> Write for Vec<u8, A> where
A: Allocator,
A: Allocator,
Get the current list of command-line arguments to chromedriver
as a vec.
sourcepub fn get_extensions(&self) -> Vec<String>ⓘNotable traits for Vec<u8, A>impl<A> Write for Vec<u8, A> where
A: Allocator,
pub fn get_extensions(&self) -> Vec<String>ⓘNotable traits for Vec<u8, A>impl<A> Write for Vec<u8, A> where
A: Allocator,
A: Allocator,
Get the current list of Chrome extensions as a vec.
Each item is a base64-encoded string containing the .CRX extension file contents.
Use add_extension()
to add a new extension file.
sourcepub fn get_binary(&self) -> String
pub fn get_binary(&self) -> String
Get the path to the chrome binary (if one was previously set).
sourcepub fn set_binary(&mut self, path: &str) -> WebDriverResult<()>
pub fn set_binary(&mut self, path: &str) -> WebDriverResult<()>
Set the path to chrome binary to use.
sourcepub fn get_debugger_address(&self) -> String
pub fn get_debugger_address(&self) -> String
Get the current debugger address (if one was previously set).
sourcepub fn set_debugger_address(&mut self, address: &str) -> WebDriverResult<()>
pub fn set_debugger_address(&mut self, address: &str) -> WebDriverResult<()>
Set the debugger address.
sourcepub fn add_chrome_arg(&mut self, arg: &str) -> WebDriverResult<()>
pub fn add_chrome_arg(&mut self, arg: &str) -> WebDriverResult<()>
Add the specified command-line argument to chromedriver
. Eg. “–disable-local-storage”
The full list of switches can be found here:
https://chromium.googlesource.com/chromium/src/+/master/chrome/common/chrome_switches.cc
sourcepub fn remove_chrome_arg(&mut self, arg: &str) -> WebDriverResult<()>
pub fn remove_chrome_arg(&mut self, arg: &str) -> WebDriverResult<()>
Remove the specified Chrome command-line argument if it had been added previously.
sourcepub fn add_encoded_extension(
&mut self,
extension_base64: &str
) -> WebDriverResult<()>
pub fn add_encoded_extension(
&mut self,
extension_base64: &str
) -> WebDriverResult<()>
Add a base64-encoded extension.
sourcepub fn remove_encoded_extension(
&mut self,
extension_base64: &str
) -> WebDriverResult<()>
pub fn remove_encoded_extension(
&mut self,
extension_base64: &str
) -> WebDriverResult<()>
Remove the specified base64-encoded extension if it had been added previously.
sourcepub fn add_extension(&mut self, crx_file: &Path) -> WebDriverResult<()>
pub fn add_extension(&mut self, crx_file: &Path) -> WebDriverResult<()>
Add Chrome extension file. This will be a file with a .CRX extension.
sourcepub fn remove_extension(&mut self, crx_file: &Path) -> WebDriverResult<()>
pub fn remove_extension(&mut self, crx_file: &Path) -> WebDriverResult<()>
Remove the specified Chrome extension file if an identical extension had been added previously.
sourcepub fn set_headless(&mut self) -> WebDriverResult<()>
pub fn set_headless(&mut self) -> WebDriverResult<()>
Set the browser to run headless.
sourcepub fn unset_headless(&mut self) -> WebDriverResult<()>
pub fn unset_headless(&mut self) -> WebDriverResult<()>
Unset the headless option.
sourcepub fn set_disable_web_security(&mut self) -> WebDriverResult<()>
pub fn set_disable_web_security(&mut self) -> WebDriverResult<()>
Set disable web security.
sourcepub fn unset_disable_web_security(&mut self) -> WebDriverResult<()>
pub fn unset_disable_web_security(&mut self) -> WebDriverResult<()>
Unset disable web security.
sourcepub fn set_ignore_certificate_errors(&mut self) -> WebDriverResult<()>
pub fn set_ignore_certificate_errors(&mut self) -> WebDriverResult<()>
Set ignore certificate errors.
sourcepub fn unset_ignore_certificate_errors(&mut self) -> WebDriverResult<()>
pub fn unset_ignore_certificate_errors(&mut self) -> WebDriverResult<()>
Unset ignore certificate errors.
pub fn set_no_sandbox(&mut self) -> WebDriverResult<()>
pub fn unset_no_sandbox(&mut self) -> WebDriverResult<()>
pub fn set_disable_gpu(&mut self) -> WebDriverResult<()>
pub fn unset_disable_gpu(&mut self) -> WebDriverResult<()>
pub fn set_disable_dev_shm_usage(&mut self) -> WebDriverResult<()>
pub fn unset_disable_dev_shm_usage(&mut self) -> WebDriverResult<()>
Trait Implementations
sourceimpl Clone for ChromeCapabilities
impl Clone for ChromeCapabilities
sourcefn clone(&self) -> ChromeCapabilities
fn clone(&self) -> ChromeCapabilities
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for ChromeCapabilities
impl Debug for ChromeCapabilities
sourceimpl Default for ChromeCapabilities
impl Default for ChromeCapabilities
sourceimpl Deref for ChromeCapabilities
impl Deref for ChromeCapabilities
sourceimpl DerefMut for ChromeCapabilities
impl DerefMut for ChromeCapabilities
sourceimpl From<ChromeCapabilities> for Capabilities
impl From<ChromeCapabilities> for Capabilities
sourcefn from(caps: ChromeCapabilities) -> Capabilities
fn from(caps: ChromeCapabilities) -> Capabilities
Converts to this type from the input type.
sourceimpl Serialize for ChromeCapabilities
impl Serialize for ChromeCapabilities
Auto Trait Implementations
impl RefUnwindSafe for ChromeCapabilities
impl Send for ChromeCapabilities
impl Sync for ChromeCapabilities
impl Unpin for ChromeCapabilities
impl UnwindSafe for ChromeCapabilities
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
sourceimpl<T> WithSubscriber for T
impl<T> WithSubscriber for T
sourcefn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
sourcefn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more