pub struct FirefoxCapabilities { /* private fields */ }
Implementations§
Source§impl FirefoxCapabilities
impl FirefoxCapabilities
pub fn new() -> Self
Sourcepub fn add_firefox_option<T>(
&mut self,
key: &str,
value: T,
) -> WebDriverResult<()>where
T: Serialize,
pub fn add_firefox_option<T>(
&mut self,
key: &str,
value: T,
) -> WebDriverResult<()>where
T: Serialize,
Add the specified firefox option. This is a helper method for the various specific option methods.
Sourcepub fn set_logging_prefs(
&mut self,
component: String,
log_level: LoggingPrefsLogLevel,
)
pub fn set_logging_prefs( &mut self, component: String, log_level: LoggingPrefsLogLevel, )
Set the selenium logging preferences. To set the geckodriver
log level,
use set_log_level()
instead.
Sourcepub fn set_log_level(&mut self, log_level: LogLevel) -> WebDriverResult<()>
pub fn set_log_level(&mut self, log_level: LogLevel) -> WebDriverResult<()>
Set the geckodriver
log level.
Sourcepub fn set_firefox_binary(&mut self, path: &Path) -> WebDriverResult<()>
pub fn set_firefox_binary(&mut self, path: &Path) -> WebDriverResult<()>
Set the path to the firefox binary.
Sourcepub fn set_page_load_strategy(
&mut self,
strategy: PageLoadStrategy,
) -> WebDriverResult<()>
pub fn set_page_load_strategy( &mut self, strategy: PageLoadStrategy, ) -> WebDriverResult<()>
Set the page load strategy to use.
Valid values are: normal
(the default)
Sourcepub fn set_preferences(
&mut self,
preferences: FirefoxPreferences,
) -> WebDriverResult<()>
pub fn set_preferences( &mut self, preferences: FirefoxPreferences, ) -> WebDriverResult<()>
Set the firefox preferences to use.
Sourcepub fn add_firefox_arg(&mut self, arg: &str) -> WebDriverResult<()>
pub fn add_firefox_arg(&mut self, arg: &str) -> WebDriverResult<()>
Add the specified command-line argument to geckodriver
.
Sourcepub fn get_firefox_option<T>(&self, key: &str) -> Twhere
T: DeserializeOwned + Default,
pub fn get_firefox_option<T>(&self, key: &str) -> Twhere
T: DeserializeOwned + Default,
Get the specified Firefox option.
Sourcepub fn get_args(&self) -> Vec<String>
pub fn get_args(&self) -> Vec<String>
Get the current list of command-line arguments to geckodriver
as a vec.
Sourcepub fn set_headless(&mut self) -> WebDriverResult<()>
pub fn set_headless(&mut self) -> WebDriverResult<()>
Set the browser to run headless.
Methods from Deref<Target = Capabilities>§
Sourcepub fn get<Q>(&self, key: &Q) -> Option<&Value>
pub fn get<Q>(&self, key: &Q) -> Option<&Value>
Returns a reference to the value corresponding to the key.
The key may be any borrowed form of the map’s key type, but the ordering on the borrowed form must match the ordering on the key type.
Sourcepub fn contains_key<Q>(&self, key: &Q) -> bool
pub fn contains_key<Q>(&self, key: &Q) -> bool
Returns true if the map contains a value for the specified key.
The key may be any borrowed form of the map’s key type, but the ordering on the borrowed form must match the ordering on the key type.
Sourcepub fn get_mut<Q>(&mut self, key: &Q) -> Option<&mut Value>
pub fn get_mut<Q>(&mut self, key: &Q) -> Option<&mut Value>
Returns a mutable reference to the value corresponding to the key.
The key may be any borrowed form of the map’s key type, but the ordering on the borrowed form must match the ordering on the key type.
Sourcepub fn get_key_value<Q>(&self, key: &Q) -> Option<(&String, &Value)>
pub fn get_key_value<Q>(&self, key: &Q) -> Option<(&String, &Value)>
Returns the key-value pair matching the given key.
The key may be any borrowed form of the map’s key type, but the ordering on the borrowed form must match the ordering on the key type.
Sourcepub fn insert(&mut self, k: String, v: Value) -> Option<Value>
pub fn insert(&mut self, k: String, v: Value) -> Option<Value>
Inserts a key-value pair into the map.
If the map did not have this key present, None
is returned.
If the map did have this key present, the value is updated, and the old value is returned.
Sourcepub fn remove<Q>(&mut self, key: &Q) -> Option<Value>
pub fn remove<Q>(&mut self, key: &Q) -> Option<Value>
Removes a key from the map, returning the value at the key if the key was previously in the map.
The key may be any borrowed form of the map’s key type, but the ordering on the borrowed form must match the ordering on the key type.
Sourcepub fn remove_entry<Q>(&mut self, key: &Q) -> Option<(String, Value)>
pub fn remove_entry<Q>(&mut self, key: &Q) -> Option<(String, Value)>
Removes a key from the map, returning the stored key and value if the key was previously in the map.
The key may be any borrowed form of the map’s key type, but the ordering on the borrowed form must match the ordering on the key type.
Sourcepub fn append(&mut self, other: &mut Map<String, Value>)
pub fn append(&mut self, other: &mut Map<String, Value>)
Moves all elements from other into self, leaving other empty.
Sourcepub fn entry<S>(&mut self, key: S) -> Entry<'_>
pub fn entry<S>(&mut self, key: S) -> Entry<'_>
Gets the given key’s corresponding entry in the map for in-place manipulation.
Sourcepub fn values_mut(&mut self) -> ValuesMut<'_>
pub fn values_mut(&mut self) -> ValuesMut<'_>
Gets an iterator over mutable values of the map.
Trait Implementations§
Source§impl Clone for FirefoxCapabilities
impl Clone for FirefoxCapabilities
Source§fn clone(&self) -> FirefoxCapabilities
fn clone(&self) -> FirefoxCapabilities
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more