webdriver v0.8 Release Notes
-
Command changes
- All commands that previously accepted a list parameter now accepts any instance of
Foldable
instead.
๐ง Overloadable configuration
๐ง It is now possible to define custom configuration types that can be used to initialize webdriver sessions.
runSession
now has the following type:runSession :: WebDriverConfig conf => conf -> WD a -> IO a
And the typeclass to create new config types looks like this:
-- |Class of types that can configure a WebDriver session. class WebDriverConfig c where -- |Produces a 'Capabilities' from the given configuration. mkCaps :: MonadBase IO m => c -> m Capabilities -- |Produces a 'WDSession' from the given configuration. mkSession :: MonadBase IO m => c -> m WDSession
Of course you can still use
WDConfig
, as it is now an instance ofWebDriverConfig
.Reworked custom HTTP headers interface
- ๐ Support for custom request headers was added rather hastily, resulting in several functions having explicit
RequestHeaders
parameters. The interface has been reworked now so that custom request headers are stored insideWDSession
and explicitRequestHeaders
parameters have been removed. - ๐ง There's also now a distinction in configuration between
wdAuthHeaders
which are used only during initial session creation, andwdRequestHeaders
, which are used with all other HTTP requests - Two new utility functions were added to make working with custom HTTP headers easier:
withRequestHeaders
andwithAuthHeaders
Clean-up and dependency changes
- โ Removed a whole mess of unusued import and deprecation warnings when building with GHC 7.10
- ๐ We now enforce an attoparsec lower bound of 0.10 (there was no lower bound before)
- ๐ The unnecessary dependency on mtl is now removed.
- โ Added some monad transformer instances for WebDriver and WDSessionState that were mysteriously missing: strict WriterT, ReaderT, ListT
- 0๏ธโฃ data-default dependency was changed to data-default-class
- All commands that previously accepted a list parameter now accepts any instance of