How do I run Selenium in Chrome in headless mode?
Simply change the headless attribute of the chromeOptions object to True to run Google Chrome in headless mode. Alternatively, you may use the chromeOptions object’s add argument() function to add the –headless command-line argument to run Google Chrome in headless mode with the Selenium Chrome web driver.