-- Hoogle documentation, generated by Haddock -- See Hoogle, http://www.haskell.org/hoogle/ -- | Wrapper around the webdriver package that automatically manages Selenium -- -- Please see the README on GitHub at -- https://github.com/gtollini/webdriver-wrapper#readme @package webdriver-wrapper @version 0.1.0.0 module Test.WebDriverWrapper.Constants -- | Path for geckodriver. Inside downloadPath. geckoDriverPath :: IO FilePath -- | haskell-webdriver-wrapper directory, created at -- XdgData. defaultPath :: IO FilePath -- | Url to download Selenium from. defaultSeleniumJarUrl :: String -- | Platform this code is running at. The options are: -- -- -- -- If the platform is not identified, linux64 is used. desiredPlatform :: String -- | Url to download geckodriver from. Always the latest version provided -- by geckoDriverVersionSource. getGeckoDriverDownloadUrl :: String -> String -- | API to get geckodriver's latest version. geckoDriverVersionSource :: String -- | Directory named after desiredPlatform, created at the -- defaultPath. downloadPath :: IO FilePath -- | Intermediary path for the compressed version of geckodriver. Inside -- downloadPath. geckoArchivePath :: IO FilePath -- | Archive format for geckodriver's download. .zip for Windows, -- .tar.gz for everyone else. fileFormat :: String -- | Path for selenium.jar. Inside downloadPath. seleniumPath :: IO FilePath -- | Path for Selenium's log file. Inside defaultPath. seleniumLogPath :: IO FilePath module Test.WebDriverWrapper.Helpers -- | Downloads from url at output filepath. download :: String -> FilePath -> IO () -- | Decompresses geckodriver's download, which comes in .zip for -- Windows or .tar.gz for everyone else. Takes in the archive's -- filepath and the output filepath. decompress :: FilePath -> FilePath -> IO () module Test.WebDriverWrapper.GeckoDriver -- | Checks if geckodriver is in the downloadPath. If not, -- download it. getGeckoDriverIfNeeded :: IO () module Test.WebDriverWrapper.Selenium -- | Starts Selenium and waits for its ok message ( "Selenium Server is up -- and running" ) to show up at the log file. Returns the handles for the -- Selenium process. startSelenium :: IO (Maybe Handle, Maybe Handle, Maybe Handle, ProcessHandle) -- | Checks if selenium is in the downloadPath. If not, -- download it. getSeleniumIfNeeded :: IO () -- | The wrapped functions (wrappedRunSession and -- wrappedRunWD) will download Selenium and Firefox's webdriver -- (geckodriver) if they're not already on the downloadPath, then -- start Selenium before running the webdriver equivalent function -- (runSession and runWD). They kill the Selenium process -- at the end of their execution. module Test.WebDriverWrapper -- | Same as runSession, but starts Selenium before execution and -- kills Selenium after execution. Will download Selenium or Firefox's -- webdriver (geckodriver) if any is missing. wrappedRunSession :: WebDriverConfig conf => conf -> WD a -> IO a -- | Same as runWD, but starts Selenium before execution and kills -- Selenium after execution. Will download Selenium or Firefox's -- webdriver (geckodriver) if any is missing. wrappedRunWD :: WDSession -> WD a -> IO a -- | Runs a function in between starting and killing Selenium. Takes in the -- arguments and the function, in that order. Will download Selenium or -- Firefox's webdriver (geckodriver) if any is missing. wrapWebDriverFunction :: a -> (a -> IO b) -> IO b -- | Dowloads Selenium or Firefox's webdriver (geckodriver) if they're -- missing. downloadIfMissing :: IO ()