webdriver-wrapper: Wrapper around the webdriver package that automatically manages Selenium

[ browser, bsd3, geckodriver, library, selenium, testing, web, webdriver ] [ Propose Tags ] [ Report a vulnerability ]
Versions [RSS] 0.1.0.0, 0.1.0.1, 0.2.0.0, 0.2.0.1
Change log CHANGELOG.md
Dependencies aeson (>=2.1.2.1 && <2.3), async (>=2.2.5 && <2.3), base (>=4.7 && <5), bytestring (>=0.11.5 && <0.13), directory (>=1.3.8 && <1.4), extra (>=1.7.16 && <1.8), filepath (>=1.4 && <1.6), http-conduit (>=2.3.8 && <2.4), http-types (>=0.12.4 && <0.13), process (>=1.6.18 && <1.7), process-extras (>=0.7.4 && <0.8), retry (>=0.9.3 && <0.10), string-interpolate (>=0.3.3 && <0.4), tar (>=0.5.1.1 && <0.7), text (>=2.0.2 && <2.2), unix (>=2.8.4 && <2.9), unordered-containers (>=0.2.20 && <0.3), vector (>=0.13.1 && <0.14), webdriver (>=0.12.0 && <0.13), zip-archive (>=0.4.3 && <0.5), zlib (>=0.6.3 && <0.8) [details]
License BSD-3-Clause
Copyright 2024 Gabriel Tollini
Author Gabriel Tollini
Maintainer gabrieltollini@hotmail.com
Category browser, selenium, testing, web, webdriver, geckodriver
Home page https://github.com/gtollini/webdriver-wrapper#readme
Bug tracker https://github.com/gtollini/webdriver-wrapper/issues
Source repo head: git clone https://github.com/gtollini/webdriver-wrapper
Uploaded by gtollini at 2024-07-10T18:40:26Z
Distributions NixOS:0.2.0.1, Stackage:0.2.0.1
Downloads 108 total (14 in the last 30 days)
Rating (no votes yet) [estimated by Bayesian average]
Your Rating
  • λ
  • λ
  • λ
Status Docs available [build log]
Last success reported on 2024-07-10 [all 1 reports]

Readme for webdriver-wrapper-0.2.0.0

[back to package description]

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.

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 focuses 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 just works.

How to use

The wrappedRunSession function is a drop-in replacement for runSession. It will download, if needed, Selenium and a webdriver to ~/.local/haskell-webdriver-wrapper/{your_architecture} (on Linux) or %APPDATA%/haskell-webdriver-wrapper/{your_architecture} (on Windows). Then it starts Selenium and runs your WD a computation, closing Selenium whether WD succeeds or fails.

For runWD, there are two functions: wrappedFirefoxRunWD and wrappedChromeRunWD. They're also drop-in replacements for runWD, and will also handle everything related to Selenium - the only difference being, as you can imagine, wrappedFirefoxRunWD runs your session on Firefox and wrappedChromeRunWD runs your session on Chrome.