Going headless

Going headless seems to be all the rage these days, so let's have a look at how we can add support a headless browser to our burgeoning framework.

It's actually a relatively simple change; first, we are going to use this code to modify our POM to add a <headless> property (we are going to set it to true because you are always going to want to start of running things in headless mode, right?):

<properties>    <project.build.sourceEncoding>UTF-     8</project.build.sourceEncoding>    <project.reporting.outputEncoding>UTF-     8</project.reporting.outputEncoding>    <java.version>1.8</java.version>    <!-- Dependency versions -->    <selenium.version>3.12.0</selenium.version>    <testng.version>6.14.3</testng.version>    <!-- Plugin versions -->    <driver-binary-downloader-maven-plugin.version> ...

Get Mastering Selenium WebDriver 3.0 now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.