webdriver-wrapper

Wrapper around the webdriver package that automatically manages Selenium

https://github.com/gtollini/webdriver-wrapper#readme

Version on this page:0.1.0.1
LTS Haskell 23.23:0.2.0.1
Stackage Nightly 2025-05-23:0.2.0.1
Latest on Hackage:0.2.0.1

See all snapshots webdriver-wrapper appears in

BSD-3-Clause licensed by Gabriel Tollini
Maintained by [email protected]
This version can be pinned in stack with:webdriver-wrapper-0.1.0.1@sha256:570600addd47bda4c1078c0db0354bbb60dab22f72b8ce7adc6ecf3b812f7148,2128

webdriver-wrapper

This package was created so end-users don’t need to manually manage Selenium or their webdriver when dealing with the webdriver package. For now, only geckodriver (aka Firefox) is supported - but chromedriver should be easy to implement. If you can’t use Firefox for whichever reason, let me know and I’ll look into implementing chromedriver support.

This package is strongly inspired by sandwich-webdriver. My original use-case didn’t require the sandwich test suite, though, so I made this package which intends on being simpler and more minimalistic.

Extra dependencies

You must have Java installed, since Selenium is distributed as a .jar file. I’m running OpenJDK 17 on my machine, and it works perfectly with the selected Selenium version.

How to use

There are two functions which are “batteries-included”: wrappedRunSession and wrappedRunWD. Just use them as you would runSession and runWD. The wrapped functions will handle downloading Selenium and geckodriver (if they were not already downloaded), plus starting and stopping Selenium. If you already have some code with runSession or runWD, their wrapped counterparts are drop-in replacements.

Changes

Changelog for webdriver-wrapper

All notable changes to this project will be documented in this file.

The format is based on Keep a Changelog, and this project adheres to the Haskell Package Versioning Policy.

Unreleased

0.1.0.0 - YYYY-MM-DD