Hspec-webdriver build failure and cannot access the git repo

The library hspec-webdriver fails to build with stack on lts 14.14. I also cannot access the git repo to file an issue here https://bitbucket.org/wuzzeb/webdriver-utils

Can anyone help me out?

What about using a fresher package https://hackage.haskell.org/package/webdriver which is also available on Github? I didn’t check if it has any problems though…

Thanks for the response, I’m actually using that package but if you go to the documentation that you linked at the bottom there’s a section called “Integration with Haskell Testing Frameworks” that suggests hspec-webdriver.

I guess I should have read that, sorry…
I suppose https://github.com/wuzzeb belongs to the same person as https://bitbucket.org/wuzzeb/ so you could mail the address listed on that Github user page asking about the package.

That’s a good idea haha. I’ll try and contact them through github and post the solution (if any) here.

I never got in touch with the author but all I did was run the hspec transformer then webdriver and used liftIO to lift the IO monad to the WD monad

e.g.

registrationFailTest = hspec $ do
  describe "Registration Fails" $ do
    it "should fail" $ do
      runSession ffConfig $ do

        openPage $ baseUrl ++ "/signup"

        signUpFormElem <- findElem $ ById "signUpForm"
        usernameElem <- findElem $ ByName "signUpForm.username"
        passwordElem <- findElem $ ByName "signUpForm.passwordGroup.password"
        confirmElem <- findElem $ ByName "signUpForm.passwordGroup.confirmPassword"

        sendKeys "blah@blah.com" usernameElem
        sendKeys "" passwordElem
        sendKeys "" confirmElem

        submit signUpFormElem

        currentUrl <- getCurrentURL

        liftIO $ currentUrl `shouldBe` (baseUrl ++ "/signup")

        closeSession

I am also unable to build hspec-webdriver-1.2.0. Using cabal with ghc-8.10.4
Example of one error:

Building library for hspec-webdriver-1.2.0..
[1 of 1] Compiling Test.Hspec.WebDriver ( Test/Hspec/WebDriver.hs, dist/build/Test/Hspec/WebDriver.o, dist/build/Test/Hspec/WebDriver.dyn_o )

Test/Hspec/WebDriver.hs:401:54: error:
    • Data constructor not in scope: Pending :: Maybe String -> Result
    • Perhaps you meant one of these:
        variable ‘H.pending’ (imported from Test.Hspec),
        variable ‘pending’ (line 217), ‘WdPending’ (line 164)
      Perhaps you want to add ‘Pending’ to the import list
      in the import of ‘Test.Hspec.Core.Spec’
      (Test/Hspec/WebDriver.hs:114:1-107).

@decapo01 how did you resolve your initial build issue?

My issue was lifting out of the custom monad they provided…I think your issue is a bit different from mine tho.

Note that the latest hspec-webdriver release lists GitHub - dfordivam/hspec-webdriver-clone: Clone of hspec-webdriver, as the original source is inaccesible as the home page.

v1.2.1 appears to be compatible with GHC < 9 on my machine.

I’ve also revised v1.2.0 to remove the broken build plans: Build failure in hspec-webdriver-1.2.0 with `hspec-core >= 2.5` · Issue #3 · dfordivam/hspec-webdriver-clone · GitHub

In the future, feel free to report persistently broken build plans at Issues · haskell-infra/hackage-trustees · GitHub.

Cool, I think I did actually email the original author and never received anything back so I’m glad some one made a clone.