Modulewebdriver-0.15.0.0Haskell2010
Test.WebDriver
Once upon a time, the main browser automation tool was Selenium. Users of
this package had to start a Selenium session themselves, making sure to
configure it with a browser-specific driver program like chromedriver or
geckodriver, and provide a hostname/port. Then, this package would connect to
Selenium and use its wire protocol to control browsers.
Nowadays, there is an official W3C spec (https://www.w3.org/TR/webdriver1)
specifying the protocol, and a number of implementations. Selenium still exists,
but Chromedriver and Geckodriver can both serve as standalone WebDriver servers.
This library now helps you start up a driver in one of these supported
configurations:
Selenium.jar with one or more supported sub-drivers (chromedriver,
geckodriver). This is similar to the traditional picture.
Chromedriver standalone.
Geckodriver standalone.
You can pick the configuration you want by passing a DriverConfig to the
startSession function. The WebDriver implementations have a few differences
between them, which this library tries to smooth over. For example, a single
Geckodriver instance can't start multiple Firefox sessions (see
https://github.com/mozilla/geckodriver/issues/1946). So, this library will spin
up a separate geckodriver process for every session.
For an example of using this package by itself, see Test.WebDriver.WD. For a
full test framework integrated with this package, see
sandwich-webdriver.
Contents
- WebDriverContext
- Managed sessions
- Lower-level session management
- Capabilities
- Commands
- WebDriver monad
- Exceptions
Synopsis