Selenium

We’re running our own Selenium Grid service for simple browser testing.

Important

The PyPi server is deployed via GitLab CI from the Selenium project and is only available from within private networks.

Video Recording

Our central Selenium Grid service also supports video recording. Just go to the Selenium Pipelines and do this:

  1. Click Run Pipeline

  2. Select the master branch

  3. Add a new variable RECORD with either the value start or stop

  4. Run the pipeline

You can also use this as GitLab multi-project pipeline trigger:

Start Recording:
  variables:
    RECORD: start
  trigger:
    project: confirm/selenium
    strategy: depend

Selenium Docker Images

There are official Selenium Docker images, which work fine. However, we’re building our own Selenium Docker Images for 2 reasons:

  1. The official Selenium Docker images fail from time to time (due to changes in the API’s)

  2. The official Selenium Docker images don’t have support for WebGL and crash

Running Selenium locally

To run your own Selenium Grid Docker containers, have a look at the example Compose files or use the selenium-ctl script:

# Get the script.
curl -sSfLo selenium-ctl https://git.confirm.ch/confirm/docker-images/selenium/-/raw/master/selenium-ctl
chmod 755 selenium-ctl

# Enable video support.
#VIDEO=1

# Start the Selenium containers.
./selenium-ctl up -d

# Stop the Selenium containers.
./selenium-ctl down

Note

After running the commands above, you should’ve a Selenium Grid running on http://localhost:4444/wd/hub. Have a look at the selenium-*.yml Docker Compose files after running selenium-ctl to see what Docker containers are deployed.