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

Getting Selenium (Firefox & Safari) working in Wallaby (~> 0.30.x) #782

Closed
foucist opened this issue Jul 9, 2024 · 1 comment
Closed

Comments

@foucist
Copy link

foucist commented Jul 9, 2024

I just wanted to share how I got Selenium working in Wallaby, as there seems to be some missing install instructions.

Firstly, it appears that Selenium version 4.8.3 is required, which I eventually figured out thanks to @matthewbrown48's hint. I originally tried brew install selenium-server which installed 4.22.0, but the wallaby tests ended up failing with (RuntimeError) Wallaby had an internal issue with HTTPoison: %HTTPoison.Error{id: nil, reason: :timeout}.

I downloaded selenium-server-4.8.3.jar. Which can be run like so: /homebrew/opt/openjdk/bin/java -jar ~/Downloads/selenium-server-4.8.3.jar standalone

my config/test.exs:

config :wallaby,
  driver: Wallaby.Selenium,
  selenium: [
    capabilities: %{
      browserName: "firefox", # browserName: "safari",
      "moz:firefoxOptions": %{
        args: ["-headless"]
      }
    }
  ]

For safari, there is no headless mode which is a bit disconcerting 😆. I was able to get it working by enabling it and running it as root.

   $ sudo su -
   $ safaridriver --enable
   $ safaridriver -p 0
@foucist
Copy link
Author

foucist commented Jul 9, 2024

probably should've put this in a discussion

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

1 participant