Sign inSign up

mcasperson/webdriver

By mcasperson

•Updated almost 4 years ago

Image
0

6.8K

mcasperson/webdriver repository overview

A Dozerized version of the app from https://github.com/OctopusDeploy/WebDriverTraining⁠. The image includes Xvfb, Chromium and Firefox, and can run browsers either normally or headless.

This image is documented at https://octopus.com/blog/devops-documentation⁠.

The Cucumber steps exposed by the image are defined in the AutomatedBrowserBase⁠ class.

The typical usage of this image will mount a feature file, and optionally mount a directory where screenshots are saved.

docker run \
  -v $(pwd)/test.feature:/tmp/test.feature \
  -v /tmp/screenshot:/tmp/screenshot \
  mcasperson/webdriver \
  /tmp/test.feature

Where test.feature looks like this:

Feature: Test feature
  Scenario: Open google
    Given I open the shared browser "ChromeNoImplicitWait"
    When I open the URL "https://google.com"
    And I sleep for "1" second
    And I save a screenshot to "/tmp/screenshot/image.png"

Setting the XVFB_RESOLUTION environment variable defined the desktop size that the browser will operate in.

docker run \
  -v $(pwd)/test.feature:/tmp/test.feature \
  -v /tmp/screenshot:/tmp/screenshot \
  -e XVFB_RESOLUTION=1920x1080x24 \
  mcasperson/webdriver \
  /tmp/test.feature

Java system properties and other settings are defined in the JAVA_OPTS environment variable:

docker run \
  -v $(pwd)/test.feature:/tmp/test.feature \
  -v /tmp/screenshot:/tmp/screenshot \
  -e JAVA_OPTS=-DCucumberAlias-ExternalVideoDir=/github/workspace \
  mcasperson/webdriver \
  /tmp/test.feature

Tag summary

Content type

Image

Digest

sha256:2c687d794…

Size

1.2 GB

Last updated

almost 4 years ago

docker pull mcasperson/webdriver