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

Can't start examples #87

Open
fzhulitov opened this issue May 12, 2024 · 1 comment
Open

Can't start examples #87

fzhulitov opened this issue May 12, 2024 · 1 comment

Comments

@fzhulitov
Copy link

fzhulitov commented May 12, 2024

from https://codedownio.github.io/sandwich/docs/extensions/sandwich-webdriver
i make this example
runSandwich defaultOptions spec
and spec

spec :: TopSpec
spec = introduceWebDriver (defaultWdOptions "/tmp/tools") $ do
  it "opens Google and searches" $ withSession1 $ do
    openPage "http://www.google.com"
    search <- findElem (ByCSS "input[title='Search']")
    click search
    sendKeys "asdf\n" search

get this

Beginning suite of 1 tests

  opens Google and searches
      Context exception:
      Got exception (Failure in introduce 'Introduce WebDriver session' allocation handler)
          Failed to obtain geckodriver: 'ExpectedButGot {failureCallStack = Just [("shouldBe",SrcLoc {srcLocPackage = "sandwich-webdriver-0.2.3.1-JV0aJiV9iIHBOwGgn8Mebj", srcLocModule = "Test.Sandwich.WebDriver.Internal.Binaries", srcLocFile = "src/Test/Sandwich/WebDriver/Internal/Binaries.hs", srcLocStartLine = 188, srcLocStartCol = 38, srcLocEndLine = 188, srcLocEndCol = 48})], failureValue1 = ExitSuccess, failureValue2 = ExitFailure 2}'
          CallStack (from HasCallStack):
            error, called at src/Test/Sandwich/WebDriver/Internal/StartWebDriver.hs:82:21 in sandwich-webdriver-0.2.3.1-JV0aJiV9iIHBOwGgn8Mebj:Test.Sandwich.WebDriver.Internal.StartWebDriver
            startWebDriver, called at src/Test/Sandwich/WebDriver.hs:76:3 in sandwich-webdriver-0.2.3.1-JV0aJiV9iIHBOwGgn8Mebj:Test.Sandwich.WebDriver
            allocateWebDriver, called at src/Test/Sandwich/WebDriver.hs:61:83 in sandwich-webdriver-0.2.3.1-JV0aJiV9iIHBOwGgn8Mebj:Test.Sandwich.WebDriver
            introduceWebDriver, called at app/Main.hs:43:8 in main:Main
@thomasjm
Copy link
Collaborator

Hmm, can you turn on debug logging with --debug or similar?

Downloading dependencies like geckodriver currently requires a few tools like wget, curl, and tar. Is it possible one of those isn't on your PATH?

This situation will improve soon when we add support for obtaining things like geckodriver automatically via Nix.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants