Skip to content

Remote web driver configuration

Soumyajit Basu (C0r3f!nd3r) edited this page Feb 15, 2020 · 4 revisions

To execute your selenium code using a remote web driver inside a container please do the required

Installation

Install Docker Desktop

Standalone Remote Drivers

Pull in the respective docker images. You can run your code on selected stand alone remote chrome, firefox driver or you can use selenium grid to spin up corresponding nodes in order to run your tests.

Pull in the required image if you want to run your tests in a standalone firefox container
docker pull selenium/standalone-firefox

Pull in the required image if you want to run your tests in a standalone chrome container
docker pull selenium/standalone-chrome

Run standalone remote driver containers

docker run -d -p 4444:4444 -v /dev/shm:/dev/shm selenium/standalone-chrome:3.141.59-zirconium
docker run -d -p 4444:4444 -v /dev/shm:/dev/shm selenium/standalone-firefox:3.141.59-zirconium

Selenium Grid

To run your code remotely using selenium grid pull the required docker images

Pull Grid images

To get the required images use the following code below

docker pull selenium/hub
docker pull selenium/node-firefox
docker pull selenium/node-chrome

Run Grid Container

To run your grid containers use the following code below

docker run -p 4444:4444 --name selenium-hub selenium/hub
docker run --link selenium-hub:hub selenium/node-chrome
docker run --link selenium-hub:hub selenium/node-firefox