Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tutorial issues #43

Open
georgefst opened this issue Apr 15, 2022 · 1 comment
Open

Tutorial issues #43

georgefst opened this issue Apr 15, 2022 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@georgefst
Copy link

There are a few things which could be improved about the tutorial:

  • It doesn't compile. This is seemingly because Tutorial.md isn't up to date with app/Main.lhs. For example, it has do_a_barrel_roll :: WebDriver IO (), which should presumably be do_a_barrel_roll :: WebDriverT IO ().
  • When modifications are made to make it compile, there are still a lot of warnings.
  • Google's barrel roll isn't a good example anymore, at least without some modification, as it gets blocked by an "accept cookies" popup.
  • It would be great to have Cabal instructions as well as Stack.
@nbloomf nbloomf self-assigned this Apr 25, 2022
@nbloomf nbloomf added the bug Something isn't working label Apr 25, 2022
@apraga
Copy link

apraga commented Oct 31, 2022

I can go to google.com using this code :

{-# LANGUAGE OverloadedStrings #-}
module Main where

import Web.Api.WebDriver

do_a_barrel_roll :: WebDriverT IO ()
do_a_barrel_roll = do
  fullscreenWindow
  navigateTo "https://www.google.com"
  wait 5000000
  return ()

main :: IO ()
main = do
  execWebDriverT defaultWebDriverConfig
    (runIsolated_ defaultFirefoxCapabilities do_a_barrel_roll)
  return ()

With a simple cabal file (cabal 3.4.1.0)

executable quilt
    main-is:          Main.hs
    build-depends:    base
                    , webdriver-w3c
    hs-source-dirs:   app
    default-language: Haskell2010

It does not solve the issue of the popup on Google though.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants