How to run a headless Browser with Selenium Java

asked 1 year ago

We can run the test on any browser with headless mode, the Selenium webdriver provides the capabilities while Invoking the browser,

For example to invoke Chrome browser headless

options.addArguments("--headless");

 

ChromeOptions options = new ChromeOptions();
options.addArguments("--headless");
WebDriver driver = new ChromeDriver(options);
driver.get("https://www.qafeast.com/demo");