Google Chrome version 59+ contains a real headless mode with no need of any display like xvfb or vnc.
| Build Status | Dependencies UpToDate | License |
|---|---|---|
If you use Guice for injections, just bind the Provider HeadlessChromeProvider.
The config uses the typesafe config.
| Path | Description | Default | Required |
|---|---|---|---|
| webdriver.chrome.driver | The path to the chromedriver binary | bundled in resources | ❌ |
| webdriver.chrome.binary | The path to the chrome binary | /usr/bin/google-chrome-unstable | ✅ |
| chrome.window.size | The window size as string: "width,height" | "1920,1200" | ❌ |
| chrome.headless | True for headless mode | true | ❌ |
<project ...>
<repositories>
<repository>
<id>reinvent.software</id>
<url>https://maven.reinvent-software.de/nexus/content/groups/public/</url>
</repository>
</repositories>
</project><dependency>
<groupId>software.reinvent</groupId>
<artifactId>headless-chrome</artifactId>
<version>0.1.0</version>
</dependency>Add maven repo to build.sbt.
resolvers ++= Seq(
Resolver.mavenLocal,
"ReInvent Software OSS" at "https://maven.reinvent-software.de/nexus/content/groups/public"
)libraryDependencies += "software.reinvent" % "headless-chrome" % "0.1.4"