The ChromeDriver works similar to the Geckodriver and implements the W3C WebDriver protocol. We saw how to set up and use ChromeDriver in Chapter 1. In this section, we will focus on the ChromeDriver options to run tests in headless mode, use mobile emulation, and use custom profiles.
Chrome Driver
Using Headless Mode
Similar to Firefox, we can run tests in headless mode with ChromeDriver. This makes Chrome tests run faster and tests run more efficiently, especially in the CI (Continuous Integration) environment.
We can run Selenium tests in headless mode by configuring the ChromeOptions class as shown in the following code snippet:
@BeforeMethod
public void setup() {
System.setProperty("webdriver.chrome.driver"...