Hard code webdriver docker version (#208)

This commit is contained in:
Shicong Huang 2019-08-01 14:02:57 -04:00 committed by GitHub
parent 0a779612f6
commit 3cc8d83396
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -26,7 +26,6 @@ import org.openqa.selenium.WebDriver;
import org.openqa.selenium.chrome.ChromeOptions;
import org.openqa.selenium.remote.RemoteWebDriver;
import org.testcontainers.containers.BindMode;
import org.testcontainers.containers.BrowserWebDriverContainer;
import org.testcontainers.containers.GenericContainer;
import org.testcontainers.containers.wait.strategy.Wait;
@ -41,10 +40,9 @@ class DockerWebDriverRule extends ExternalResource {
private static URL getWebDriverUrl() {
// BrowserWebDriverContainer will try and match the version of the Dockerized
// browser to whichever version of Selenium is found on the classpath
// TODO(#209): Find a way to automatically detect the version of docker image
GenericContainer container =
new BrowserWebDriverContainer()
new GenericContainer("selenium/standalone-chrome:3.141.59-mercury")
.withFileSystemBind("/dev/shm", "/dev/shm", BindMode.READ_WRITE)
.withExposedPorts(CHROME_DRIVER_SERVICE_PORT)
.waitingFor(Wait.forHttp("/").withStartupTimeout(Duration.of(20, ChronoUnit.SECONDS)));