webdriver: a Haskell client for the Selenium WebDriver protocol

[ browser, bsd3, library, selenium, testing, web, webdriver ] [ Propose Tags ] [ Report a vulnerability ]

A Selenium WebDriver client for Haskell. You can use it to automate browser sessions for testing, system administration, etc.

For more information about Selenium itself, see http://seleniumhq.org/

To find out what's been changed in this version and others, see the change log at https://github.com/kallisti-dev/hs-webdriver/blob/master/CHANGELOG.md


[Skip to Readme]

Flags

Manual Flags

NameDescriptionDefault
developer

Package development mode

Disabled
Automatic Flags
NameDescriptionDefault
network-uri

Get Network.URI from the network-uri package

Enabled

Use -f <flag> to enable a flag, or -f -<flag> to disable that flag. More info

Downloads

Note: This package has metadata revisions in the cabal description newer than included in the tarball. To unpack the package including the revisions, use 'cabal get'.

Maintainer's Corner

Package maintainers

For package maintainers and hackage trustees

Candidates

  • No Candidates
Versions [RSS] 0, 0.0.1, 0.1, 0.2, 0.3, 0.3.0.1, 0.3.1, 0.3.2, 0.3.2.1, 0.3.3, 0.4, 0.5, 0.5.0.1, 0.5.1, 0.5.2, 0.5.3, 0.5.3.1, 0.5.3.2, 0.5.3.3, 0.5.4, 0.5.5, 0.6, 0.6.0.1, 0.6.0.2, 0.6.0.3, 0.6.0.4, 0.6.1, 0.6.2, 0.6.2.1, 0.6.3, 0.6.3.1, 0.7, 0.8, 0.8.0.1, 0.8.0.2, 0.8.0.3, 0.8.0.4, 0.8.1, 0.8.2, 0.8.3, 0.8.4, 0.8.5, 0.9, 0.9.0.1, 0.10.0.0, 0.10.0.1, 0.11.0.0, 0.12.0.0, 0.12.0.1 (info)
Change log CHANGELOG.md
Dependencies aeson (>=0.6.2.0 && <1.6), attoparsec (>=0.10), base (>=4.9 && <4.15), base64-bytestring (>=1.0), bytestring (>=0.9), call-stack, data-default-class, directory (>1.0), directory-tree (>=0.11), exceptions (>=0.4), filepath (>1.0), http-client (>=0.3), http-types (>=0.8), lifted-base (>=0.1), monad-control (>=0.3), network (>=2.4), network-uri, scientific (>=0.2), temporary (>=1.0), text (>=0.11.3), time (>1.0), transformers (>=0.4), transformers-base (>=0.1), unordered-containers (>=0.1.3), vector (>=0.3), zip-archive (>=0.1.1.8) [details]
Tested with ghc ==7.4.2, ghc ==7.6.3, ghc ==7.8.4, ghc ==7.10.3, ghc ==8.0.1
License BSD-3-Clause
Author Adam Curtis
Maintainer kallisti.dev@gmail.com
Revised Revision 1 made by Bodigrim at 2021-10-24T15:32:56Z
Category Web, Browser, Testing, WebDriver, Selenium
Home page https://github.com/kallisti-dev/hs-webdriver
Bug tracker https://github.com/kallisti-dev/hs-webdriver/issues
Source repo head: git clone git://github.com/kallisti-dev/hs-webdriver.git
Uploaded by AdamCurtis at 2019-06-10T22:12:42Z
Distributions LTSHaskell:0.12.0.0, NixOS:0.12.0.0, Stackage:0.12.0.0
Reverse Dependencies 10 direct, 0 indirect [details]
Downloads 33022 total (185 in the last 30 days)
Rating 2.0 (votes: 2) [estimated by Bayesian average]
Your Rating
  • λ
  • λ
  • λ
Status Docs available [build log]
Last success reported on 2019-06-10 [all 1 reports]

Readme for webdriver-0.9.0.1

[back to package description]

Build Status

hs-webdriver is a Selenium WebDriver client for the Haskell programming language. You can use it to automate browser sessions for testing, system administration, etc.

For more information about Selenium itself, see http://seleniumhq.org/

Contents

Installation

hs-webdriver uses the Cabal build system to configure, build, install, and generate documentation on multiple platforms.

For more information on using Cabal and its various installation options, see the Cabal User's Guide at http://www.haskell.org/cabal/users-guide/index.html

Installation from Hackage

hs-webdriver is hosted on Hackage under the name webdriver. Thus, the simplest way to download and install the most recent version of hs-webdriver is to run:

cabal install webdriver

There are also options to do system-wide installation, version selection, and other build options; see cabal-install documentation.

Installation from this repository

To build and install a git revision for a single user on your system, run these commands from within the repository directory

Using cabal-install

cabal install

Using Cabal

For systems without cabal-install available, you can also run the Setup.hs script, as such:

runhaskell Setup.hs configure --user
runhaskell Setup.hs build
runhaskell Setup.hs install

For more build options, please refer to the Cabal documentation.

Getting Started

WebDriver is a client-server protocol. Since hs-webdriver only implements a WebDriver client, you must have a WebDriver server to which you can connect in order to make use of this library.

Using the Selenium Server

While you can use any WebDriver server out there, probably the simplest server to use with hs-webdriver is Selenium Server. You'll need an installation of the Java runtime to use this server. Once you've downloaded Selenium Server to your current working directory, you can start the server with this shell command:

java -jar selenium-server-standalone-*.jar

The server should now be listening at localhost on port 4444.

Currently, hs-webdriver only supports selenium version 2. The beginner example was tested with selenium-server-standalone-2.53.1.

Hello, World!

With the Selenium server running locally, you're ready to write browser automation scripts in Haskell.

A simple example can be found here, written in literate Haskell so that you can compile it with GHC yourself. It is very beginner friendly and assumes no prior knowledge of Haskell. For other examples see the examples and test/etc directory.

Integration with Haskell Testing Frameworks

This package does not provide utilities to integrate with popular Haskell testing frameworks. However, other packages exist for this purpose:

Documentation

Documentation for hs-webdriver is available on Hackage at http://hackage.haskell.org/package/webdriver. You can also generate local HTML documentation from this source revision with the following shell command:

runhaskell Setup.hs haddock

Haddock will generate documentation and save it in dist/doc/html/webdriver