Crates.io | webdriver_client |
lib.rs | webdriver_client |
version | 0.2.5 |
source | src |
created_at | 2017-06-04 23:58:46.851335 |
updated_at | 2020-10-30 19:33:16.318835 |
description | WebDriver client library |
homepage | |
repository | https://github.com/fluffysquirrels/webdriver_client_rust |
max_upload_size | |
id | 17756 |
size | 115,411 |
webdriver_client
on crates.io
Source code and issues on GitHub:
Pull requests welcome.
GeckoDriver and ChromeDriver are fully supported as WebDriver backends by the webdriver_client::firefox::GeckoDriver
and webdriver_client::chrome::ChromeDriver
structs. This crate expects the driver to be on your path.
However HttpDriver will accept any WebDriver server's HTTP URL, so
Microsoft WebDriver for Edge, safaridriver
for Apple
Safari, and OperaDriver for Opera should all work if you start the
server yourself.
The scripts bin/download_geckodriver
and bin/download_chromedriver
download the Linux x64 binary releases for geckodriver and chromedriver.
This snippet will download the drivers and place it on your current shell's path:
bin/download_geckodriver
bin/download_chromedriver
export PATH=$PATH:$PWD/bin
cargo test
runs a few tests. Integration tests require geckodriver and chromedriver to be installed.
Error
implements std::error::Error
.DriverSession::screenshot()
and Element::screenshot()
.Element::click()
.Element::send_keys()
.DriverSession
: dismiss_alert
, accept_alert
, get_alert_text
, send_alert_text
.www
bin has new commands: frames
, switchframe
.Driver::session and DriverSession::create_session
take
a NewSessionCmd
argument that specifies the session capabilities.DriverSession
: browser_name
Element
: property
, clear
, find_element
, find_elements
raw_reference
.This fork is based on equalsraf's excellent work from https://github.com/equalsraf/webdriver.