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 of WebDriverConfig.

    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 inside WDSession and explicit RequestHeaders parameters have been removed.
    • ๐Ÿ”ง There's also now a distinction in configuration between wdAuthHeaders which are used only during initial session creation, and wdRequestHeaders, which are used with all other HTTP requests
    • Two new utility functions were added to make working with custom HTTP headers easier: withRequestHeaders and withAuthHeaders

    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