Selenium in docker image


#1

Hi,

I’ve been trying to setup a CircleCI workflow using selenium. I would like to use the selenium/standalone-chrome image as suggested by Tom in the following link.

I define a name for the selenium container as below :

- 
    name: selenium
    image: selenium/standalone-chrome

I can access and manage selenium using the following selenium:4444/wd/hub. However, I don’t know what host I should define to access my main container running the web server.

I have tried localhost:80 or even 127.0.0.1:80 I have tried changing ports as well. It is not working. Every time the browser returns a connection refused.

If I understand it well, it would seem the selenium browser runs in its own image and thus when using localhost or 127.0.0.1, the browser tries to connect with the docker host running the Chrome instance. Which is obviously not the image containing the web server.

How can I access the web-server running in my main image from the selenium docker image?


#2

This topic was automatically closed 41 days after the last reply. New replies are no longer allowed.