webdriver-w3c icon indicating copy to clipboard operation
webdriver-w3c copied to clipboard

Question: comparison with webdriver package

Open thomasjm opened this issue 5 years ago • 3 comments

This looks like a great package! I was wondering if you could clarify how this compares with the older webdriver package. It looks like this package is more directly aimed at complying with the W3C spec, and has a different API design (monad transformer vs. typeclass). I see there's a brief mention of webdriver in the README but it would be super helpful if you could say more about this package's motivation/differences/when to choose one versus the other. Thanks!

thomasjm avatar Jan 31 '20 01:01 thomasjm

I've just ported a (small-ish) project to this library, to avoid some of webdriver's limitations, so I may as well weigh in. In general, it's improved my code (apart from having to litter it with T.pack and T.unpack, see below about Text). And I can use Firefox! Which is crucial in my case, due to Chromium being broken on aarch64-linux in Nixpkgs.

Pros

  • Works from GHCI.
  • Better logging, making things easier to debug.
  • Supports Firefox. In fact, encourages it in examples.
  • Cleaner API (somewhat subjective).
  • More actively maintained (slightly).

Cons

I have more faith in these being solvable than I do in webdriver's limitations being overcome any time soon.

  • ~~Uses String over Text (why?).~~ Fixed in #54!
  • Has some dependencies which are currently difficult to cross-compile (most people won't care about this):
    • https://github.com/TomMD/entropy/pull/20#issuecomment-1100216384
    • https://github.com/haskell/wreq/pull/147
  • Heavy dependency tree:
    • lens ~~is pulled in due to wreq~~
      • ~~But maybe someone can take a second stab at https://github.com/haskell/wreq/pull/78. It's been a long time and maintenance has seemingly changed hands.~~
    • tasty: #44

georgefst avatar Apr 15 '22 19:04 georgefst

Cons

For cross-build, I've done a fully static build with musl based on Haskell.nix without any problem except need to fix Aeson 2 dependency. What specific issues have you met?

hughjfchen avatar Apr 18 '22 03:04 hughjfchen

For cross-build, I've done a fully static build with musl based on Haskell.nix without any problem except need to fix Aeson 2 dependency. What specific issues have you met?

Yeah, okay, I'm being a bit fussier here and talking specifically about cross-compilation without Nix, which does have some workarounds for custom setups and TH.

georgefst avatar Apr 24 '22 11:04 georgefst