Changelog for webdriver-precore-0.2.0.0

webdriver-precore-0.2.0.0 (2026-01-17)

Breaking Changes

Module Restructure

The library has been reorganized to support both HTTP and BiDi protocols:

Main module exports updated to reflect new structure. Import from WebDriverPreCore.HTTP.* for HTTP protocol or WebDriverPreCore.BiDi.* for BiDi protocol.

Type Renames

HTTP API Changes

Status endpoint: Return type changed from DriverStatus to Status. The Status type correctly implements the spec:

New session: Now returns SessionResponse containing:

Response parsing: The Command type in the new API no longer exposes a parser field. Extract the response body value and call parseJSON on it. For migration examples, see HTTP test runners.

Migration Guide

  1. Update imports:

    -- Old
    import WebDriverPreCore.SpecDefinition
    
    -- New
    import WebDriverPreCore.HTTP.API
    
  2. Update types in code:

    -- Old
    spec :: W3Spec a
    sessionId :: SessionId
    errType :: WebDriverErrorType
    
    -- New  
    cmd :: Command a
    session :: Session
    errType :: ErrorType
    
  3. Handle new session response:

    -- Old: newSession returned SessionId
    sessionId <- runCommand $ newSession caps
    
    -- New: newSession returns SessionResponse
    sessionResp <- runCommand $ newSession caps
    let session = sessionResp.sessionId       -- Session type
        wsUrl = sessionResp.webSocketUrl      -- for BiDi connection
        caps = sessionResp.capabilities       -- matched capabilities
    
  4. Update error handling:

    -- Old
    errorCodeToErrorType code
    
    -- New
    toErrorType code
    

Deprecations

WebDriverPreCore.HTTP.SpecDefinition module deprecated (removal ~2027-02-01). This module provides backward compatibility with the old SpecDefinition API using the deprecated name HttpSpec for the spec type. Migrate to WebDriverPreCore.HTTP.API which uses the Command type.

New Features

BiDi Protocol Support

Complete implementation of W3C WebDriver BiDi protocol, including:

See WebDriverPreCore.BiDi.API for commands and WebDriverPreCore.BiDi.Protocol for types.

Error Handling Improvements

Bug Fixes

Examples

See test directory for HTTP and BiDi usage examples

webdriver-precore-0.1.0.2 (2025-05-17)

Fix Hackage build failure (ghc-9.8.4)

webdriver-precore-0.1.0.1 (2025-04-28)

README update - Stackage badge

webdriver-precore-0.1.0.0 (2025-04-27)

Downgrade cabal-version: from 3.12 => 3.8 for Stackage compatibility

webdriver-precore-0.0.0.4 (2025-04-21)

Fix another typo (bad repo examples link)

webdriver-precore-0.0.0.3 (2025-04-21)

A few documentation typos and bump version of Vector dependencies

webdriver-precore-0.0.0.2 (2025-04-21)

The initial release of this library.

See README for details