Open huds2 opened 5 months ago
I had to change the default capabilities for the WebDriver but the crate does not provide this function.
Renamed the chrome() function to chrome_caps and made it accept ChromeCapabilities as an argument.
chrome()
chrome_caps
ChromeCapabilities
Also created a chrome() function that calls chrome_caps with default ChromeCapabilities.
Usage example (changing the downloads directory):
let mut caps = DesiredCapabilities::chrome(); let mut prefs = HashMap::new(); prefs.insert("download.default_directory", "/path/to/directory"); caps.add_chrome_option("prefs", prefs)?; let driver = chrome_caps(caps).await?;
Thanks for the contribution! I still have lots of changes to merge and will try to have a look at it as soon as possible
I had to change the default capabilities for the WebDriver but the crate does not provide this function.
Renamed the
chrome()
function tochrome_caps
and made it acceptChromeCapabilities
as an argument.Also created a
chrome()
function that callschrome_caps
with defaultChromeCapabilities
.Usage example (changing the downloads directory):