webdriver-precore: A typed wrapper for W3C WebDriver (HTTP and BiDi) protocols.

[ bsd3, library, testing, webb, webdriver ] [ Propose Tags ] [ Report a vulnerability ]

This library provides typed definitions for the WebDriver W3C spec, both HTTP and BiDi.

It is designed as a foundation for building WebDriver client libraries providing type-safe endpoint definitions and response parsers without any client implementation.

If you are looking for a fully implemented web client library, you should check out an alternative such as haskell-webdriver.

For complete documentation, module organisation, and migration guides, see WebDriverPreCore.

See also the project repo and the test directory for examples.


[Skip to Readme]

Flags

Manual Flags

NameDescriptionDefault
legacy-test

Use legacy deprecated HTTP test implementations

Disabled
debug-local-config

Use local debug configuration (ignore Dhall file in test/.config)

Disabled

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

Downloads

Maintainer's Corner

Package maintainers

For package maintainers and hackage trustees

Candidates

Versions [RSS] 0.0.0.2, 0.0.0.3, 0.0.0.4, 0.1.0.0, 0.1.0.1, 0.1.0.2, 0.2.0.0, 0.2.0.1
Change log ChangeLog.md
Dependencies aeson (>=1.4 && <2.3), aeson-pretty (>=0.8 && <0.9), base (>=4.16 && <5), bytestring (>=0.10 && <0.12.3), containers (>=0.6 && <0.9), pretty-show (>=1.10 && <1.11), text (>=2.1 && <2.2), vector (>=0.12 && <0.14), webdriver-precore [details]
Tested with ghc ==9.8.2 || ==9.8.4 || ==9.10.1
License BSD-3-Clause
Copyright 2025 John Walker, Adrian Glouftsis
Author John Walker, Adrian Glouftsis
Maintainer theghostjw@gmail.com
Uploaded by JohnWalker at 2026-01-17T09:34:15Z
Category Webb, WebDriver, Testing
Home page https://github.com/pyrethrum/webdriver-precore#readme
Bug tracker https://github.com/pyrethrum/webdriver-precore/issues
Distributions LTSHaskell:0.1.0.2, NixOS:0.1.0.2, Stackage:0.1.0.2
Downloads 102 total (28 in the last 30 days)
Rating (no votes yet) [estimated by Bayesian average]
Your Rating
  • λ
  • λ
  • λ
Status Docs uploaded by user
Build status unknown [no reports yet]

Readme for webdriver-precore-0.2.0.1

[back to package description]

webdriver-precore

build Hackage Stackage Nightly

What is This Library?

This library provides typed definitions for the W3C WebDriver Protocol, supporting both the HTTP and the BiDi protocols.

This library is intended as a foundation for building WebDriver client implementations. It is type constructors only, and does not include any executable client code.

If you are writing a webdriver client, this library will save you the effort of analysing the specs and implementing the protocol types and JSON instances.

If you are looking for a library to enable you to interact with web pages directly then you need a fully implemented web client library which this library is not.

For a fully implemented webdriver client, consider an alternative such as haskell-webdriver

Why This Library?

Several libraries provide WebDriver bindings for Haskell. However, when development on this library began, the existing options were either unmaintained, dependent on Selenium, or tightly coupled with larger "batteries included" testing frameworks.

We, the authors of this library, are building our own stand-alone test framework. To support browser based testing within this framework we're first creating a series of independent low-level libraries. This library is the first in that series. Our aim is to make each of our low level libraries broadly useful to others, outside its use within our own framework.

Core Principles

  • Direct W3C WebDriver Implementation

    • No Selenium dependency
    • Full control over protocol handling
      Note: the W3C WebDriver standard is an initiative driven largely by the core Selenium contributors. It provides a uniform HTTP API to drive browsers, and can be leveraged by any library, including Selenium.
  • Minimalist Design

    • Boring Haskell
    • Few external dependencies
  • Enable a Layered Architecture

    • Provide an unopinionated WebDriver client for use in higher level libraries

Library Non-Goals

The following features are not included in this library. They belong in downstream libraries.

  • Convenience or utility functions, that do not directly correspond to an endpoint on the W3C spec.
  • Transformers, effects or similar abstractions.
  • Bespoke variations from the spec to accommodate non-standard driver behaviour.

Acknowledgements

This library would not have been possible without the prior work in:

Haskell (particularly):

Selenium and WebDriver Standards:

The decade+ efforts of the Selenium maintainers, both in forging the way with Selenium and their ongoing work in the development of the W3C standards, both HTTP and BiDi

Further Details

For further details on the structure and use of this library see the Hackage Docs.

For runnable demos and source code for an example client implementation see the test directory of this repository.