hin101
I am trying to get Wallaby setup with Chrome and Selenium (these are hosted as docker compose), here is my docker compose file:
...
chrome:
image: selenium/node-chrome:3.14.0-gallium
volumes:
- /dev/shm:/dev/shm
depends_on:
- hub
environment:
HUB_HOST: hub
hub:
image: selenium/hub:3.14.0-gallium
ports:
- "4444:4444"
When I run the tests I get the following error:
** (RuntimeError) Wallaby had an internal issue with HTTPoison:
%HTTPoison.Error{id: nil, reason: :econnrefused}
stacktrace:
(wallaby 0.25.0) lib/wallaby/httpclient.ex:50: Wallaby.HTTPClient.make_request/5
(wallaby 0.25.0) lib/wallaby/selenium.ex:92: Wallaby.Selenium.start_session/1
(wallaby 0.25.0) lib/wallaby.ex:90: Wallaby.start_session/1
(wallaby 0.25.0) lib/wallaby/feature.ex:70: Wallaby.Feature.start_session/2
(elixir 1.10.3) lib/enum.ex:1400: anonymous fn/3 in Enum.map/2
(elixir 1.10.3) lib/enum.ex:2116: Enum.map/2
test/hinesh_blogs_web/feature/admin_test.exs:3: HineshBlogsWeb.AdminTest.__ex_unit_setup_0/1
test/hinesh_blogs_web/feature/admin_test.exs:1: HineshBlogsWeb.AdminTest.__ex_unit__/2
Here is my config/test.exs:
# Chrome
config :wallaby, driver: Wallaby.Chrome
# Selenium
config :wallaby, driver: Wallaby.Selenium
config :wallaby,
hackney_options: [timeout: 5_000]
And here is the sample test I am trying to run:
defmodule HineshBlogsWeb.AdminTest do
use ExUnit.Case, async: true
use Wallaby.Feature
setup do
Wallaby.start_session(
remote_url: "http://localhost:4444/wd/hub/",
capabilities: %{browserName: "firefox"}
)
end
feature "user can login", %{session: session} do
session
|> visit("/admin/login")
|> assert(false)
end
end
I am banging my head against the wall trying to solve this, any help would be appreciated.
Trending in Questions
I having some trouble figuring out if I have set myself too strict of standards for my production server. Currently I can handle 75% of r...
New
Documentation
While reading the Scoped Routes section, I noticed that the documentation currently refers to a problem without explainin...
New
Hello,
I’m trying to build a basic Phoenix web-app, and I’d like to use Tailwind.
However, when I launch mix phx.server, I get an error...
New
Hi everyone,
I am toying with the idea of building a “match maker” for giving personal help to people that wants to start coding.
I sta...
New
I recently noticed that Elixir’s Logger defaults its primary log level to :debug when no :logger, :level application configuration is pre...
New
I’m working on a small exercise involving update_in/3, and I came up with this solution:
data = %{
name: "Periodic Table",
category:...
New
I’ve got trouble wrapping my head around the order in which functions are called in this snippet (from Phoenix’s authentication):
toke...
New
Other Trending Topics
Edit: 2026 May 15 - This post is archived.
Mob is alive!!
Main docs: mob v0.7.11 — Documentation
A bit of explanation for the slightly c...
New
Hey, I’m Jesse and I’m the main contributor behind Dexter, a full-featured, lightning-fast Elixir LSP optimized for large codebases. It s...
New
I am happy to introduce the very α version of the new programming language compiled to BEAM.
Welcome Cure.
It has literally three kille...
New
Hobbes is a low-level distributed database for the Elixir programming language.
Hobbes provides a simple, safe, and scalable storage lay...
New
Hi everyone!
The first release candidate for the Expert language server project is now available!
We’ve published a press release detai...
New
A little off-topic, but I feel like people here have a good head on their shoulders.
I used to be quite good at making software. Was luc...
New
Categories:
Sub Categories:
Forums
Popular Tags
- #ecto
- #liveview
- #troubleshooting
- #learning-elixir
- #library
- #deployment
- #erlang
- #testing
- #genserver
- #mix
- #absinthe
- #remote-other
- #otp
- #plug
- #how-to-question
- #macros
- #postgres
- #elixirconf
- #channels
- #exunit
- #discussion
- #code-sync
- #podcasts
- #javascript
- #onsite
- #dialyzer
- #docker
- #authentication
- #umbrella
- #full-time-contract
- #podcasts-by-brainlid
- #ai
- #ecto-query
- #elixirconf-us
- #blog-post
- #elixir-ls
- #phoenix_html
- #iex
- #graphql
- #genstage
- #websockets
- #supervisor
- #advent-of-code
- #distillery
- #processes
- #elixirconf-eu
- #api
- #forms
- #metaprogramming
- #hex










Showing Posts 1 to 10- Show Best Posts
- Show All (oldest first)
- Show All (newest first)
Exadra37
I don’t have any experience with Wallaby, chrome or selenium, but I have some with Docker.
Can you try:
So you are replacing
localhostby the name of the service in docker compose, because that’s how containers communicate between them. Usinglocalhostinside a container will reach the container internal network, not the your host network or the other container network.hin101
Nope didn’t work
There has to be a way for it to work with containers but can’t figure it out.
michallepicki
Are you trying to use the Chromedriver Wallaby backend or the Selenium Wallaby backend? If you have both of the above lines in your config, you’ll end up using Selenium. I am not familiar with how the
selenium/hubandselenium/node-chromedocker images work but it seems that they are exposing Selenium.Looking at the Feature module documentation, won’t that result in the test trying to create two browser instances? I think the
featuremacro will callstart_sessionfor you already, but I may be wrong.I think to set
capabilitieswhen using thefeaturemacro, the@sessionsmodule attribute should be used. But you should double check with the documentation.Are you sure that Firefox is available to be started by your selenium hub? You can check that by navigating to
http://localhost:4444/wd/hub/in your browser, clicking Create Browser and selecting Firefox in the dropdown.slouchpie
Hi there,
I have been setting up Wallaby in docker with my new Phoenix app and today I finished setting up. It works very well and I have no problems, but I am using the default
Wallaby.Chromedriver.Out of curiousity, I added this one line to my
config/test.exs:and ran the tests again. I immediately got this error:
which seems to be the same problem as you.
Then I saw this:
https://github.com/elixir-wallaby/wallaby/issues/351
which describes the same problem over two years ago.
I strongly recommend not using
Wallaby.Seleniumand sticking with the defaultWallaby.Chromedriver.mhanberg
The
Wallaby.Chromedriver will startchromedriverfor you, whereas theWallaby.Seleniumdriver does not start the selenium server automatically. I believe you are getting that error because you have not started the selenium server.This issue you linked is regarding the old phantom js driver, so I don’t think it is relevant.
For the top-level post, to get selenium to run using chrome and
Wallaby.Feature, you can set the default capabilities in your application config to use chromeIf you are running selenium and your tests using docker-compose, you need to make sure to set the
remote_urlto the appropriate value, using the docker-compose created networkhttp://hub:4444/wd/hub/. This currently isn’t supported by app config, so if using with theWallaby.Featuremodule, you’ll need to pass it in as an option tostart_session.Or, you can write your own ExUnit.CaseTemplate to start this in a
setup, while usingimport Wallaby.Featureinstead ofuse Wallaby.Feature. You can find an example of this at the bottom of this page: Wallaby.Feature — wallaby v0.31.0.I apologize for just seeing this, but I recently set an alert on the wallaby tag. I should be notified of any further questions
slouchpie
Thanks for the clarification.
Can you advise please - is there any reason why
Seleniumdriver might be preferred overChromedriver?mhanberg
You would want to use the selenium driver in order to test with Firefox, edge, or safari. Or if you’re using a hosted selenium service.
slouchpie
There is a crucial problem in this that you should change. The
remote_urlhas to end in a trailing slash/or else it won’t work.You can see this in
webdriver_client.exin the wallaby lib:It just does bare string interpolation.
mhanberg
Good point to mention. That should be fixed. Thanks!
slouchpie
While I have your attention, I am getting a problem while trying to use Selenium (default driver works fine for me). I am using
and I get this error:
Any ideas? No need to spend much time on it, just if you have any “hunch” of what might be happening.