Ashwiinn Karaangutkar
Ashwiinn Karaangutkar

Reputation: 171

Create docker image to run selenium tests on different browser versions

I am currently learning to use docker to run selenium tests. However, to run tests on different versions of the browser, it requires creating our own image.

I tried few ways but failed to run them. I used the docker file at below path:

https://hub.docker.com/r/selenium/node-chrome/~/dockerfile/

and tried to build the image by using the following command:

docker build -t my-chrome-image --build-arg CHROME_DRIVER_VERSION=2.23 --build-arg CHROME_VERSION=google-chrome-beta=53.0.2785.92-1 NodeChrome

Can anyone guide me on how to implement the same?

Regards,

Ashwin Karangutkar

Upvotes: 0

Views: 2066

Answers (2)

YYY
YYY

Reputation: 6341

Use

docker build -t my-chrome-image --build-arg CHROME_DRIVER_VERSION=2.23 --build-arg CHROME_VERSION=google-chrome-beta <path_to_Dockerfile>

Upvotes: 1

kimy82
kimy82

Reputation: 4465

I am using elgalu/selenium.

docker run -d --name=grid -p 4444:24444 -p 5900:25900 --shm-size=1g elgalu/selenium 

And looking in elgalu looks like you can change the browser versions. Adding -e FIREFOX_VERSION=38.0.6 to the docker run command.

Upvotes: 0

Related Questions