webdriver 0.8.0.4 → 0.8.1
raw patch · 5 files changed
+20/−13 lines, 5 files
Files
- CHANGELOG.md +5/−0
- src/Test/WebDriver/Capabilities.hs +1/−1
- src/Test/WebDriver/Commands.hs +1/−8
- src/Test/WebDriver/JSON.hs +12/−3
- webdriver.cabal +1/−1
CHANGELOG.md view
@@ -1,5 +1,10 @@ #Change Log +###0.8.1+* Previously internal convenience functions `noReturn` and `ignoreReturn` are now exported in Test.WebDriver.JSON+* `elemInfo` is now deprecated due to it being phased out in the Marionette (Firefox) driver. It will likely be removed once Selenium 4 is released.+* Fixed an issue causing PAC settings to not work. + ##0.8.0.4 * Quick fix to parse "unsupported command" errors when using Marionette driver (Selenium + Marionette has nonstandard behavior when reporting that error type)
src/Test/WebDriver/Capabilities.hs view
@@ -630,7 +630,7 @@ ["proxyType" .= ("AUTODETECT" :: String)] PAC{autoConfigUrl = url} -> ["proxyType" .= ("PAC" :: String)- ,"autoConfigUrl" .= url+ ,"proxyAutoconfigUrl" .= url ] Manual{ftpProxy = ftp, sslProxy = ssl, httpProxy = http} -> ["proxyType" .= ("MANUAL" :: String)
src/Test/WebDriver/Commands.hs view
@@ -107,14 +107,6 @@ import Prelude -- hides some "unused import" warnings --- |Convenience function to handle webdriver commands with no return value-noReturn :: WebDriver wd => wd NoReturn -> wd ()-noReturn = void---- |Convenience function to ignore result of a webdriver command-ignoreReturn :: WebDriver wd => wd Value -> wd ()-ignoreReturn = void- -- |Create a new session with the given 'Capabilities'. The returned session becomes the \"current session\" for this action. -- -- Note: if you're using 'runSession' to run your WebDriver commands, you don't need to call this explicitly.@@ -439,6 +431,7 @@ -- undefined by the WebDriver protocol. elemInfo :: WebDriver wd => Element -> wd Value elemInfo e = doElemCommand methodGet e "" Null+{-# DEPRECATED elemInfo "This command does not work with Marionette (Firefox) driver, and is likely to be completely removed in Selenium 4" #-} -- |Click on an element. click :: WebDriver wd => Element -> wd ()
src/Test/WebDriver/JSON.hs view
@@ -26,9 +26,10 @@ , apResultToWD, aesonResultToWD -- * Parse exception , BadJSON(..)- -- * "no return value" type- , NoReturn(..)+ -- * parsing commands with no return value+ , NoReturn(..), noReturn, ignoreReturn ) where+import Test.WebDriver.Class (WebDriver) import Data.Aeson as Aeson import Data.Aeson.Types@@ -38,7 +39,7 @@ import qualified Data.Attoparsec.ByteString.Lazy as AP import qualified Data.HashMap.Strict as HM -import Control.Monad (join)+import Control.Monad (join, void) import Control.Applicative import Control.Monad.Trans.Control import Control.Exception.Lifted@@ -63,6 +64,14 @@ parseJSON (Object o) | HM.null o = return NoReturn parseJSON (String "") = return NoReturn parseJSON other = typeMismatch "no return value" other++-- |Convenience function to handle webdriver commands with no return value.+noReturn :: WebDriver wd => wd NoReturn -> wd ()+noReturn = void++-- |Convenience function to ignore result of a webdriver command.+ignoreReturn :: WebDriver wd => wd Value -> wd ()+ignoreReturn = void -- |Construct a singleton JSON 'object' from a key and value.
webdriver.cabal view
@@ -1,5 +1,5 @@ Name: webdriver-Version: 0.8.0.4+Version: 0.8.1 Cabal-Version: >= 1.10 License: BSD3 License-File: LICENSE