Skip to content
Advertisement

How to connect to remote Selenium drivers within the same docker-compose?

I ran into a

urllib3.exceptions.MaxRetryError: HTTPConnectionPool(host=’chromedriver’, port=4444): Max retries exceeded with url: /wd/hub/session (Caused by NewConnectionError(‘<urllib3.connection.HTTPConnection object at 0x7fc2de559bb0>: Failed to establish a new connection: [Errno 111] Connection refused’))

While running Selenium via Python and Docker.

My Connection looks like this:

JavaScript

The docker-compose like this:

JavaScript

Thanks in advance!

Advertisement

Answer

I solved it by changing the entrypoint of “runner” to:

JavaScript

I thought, that was handled by the “depends-on”-clause

User contributions licensed under: CC BY-SA
1 People found this is helpful
Advertisement