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: .. code-block:: yaml 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: .. code-block:: bash # 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.