When using Chrome Selenium-WebDriver, it will output diagnostic output when the servers are started:
Started ChromeDriver (v2.0) on port 9515
For me the only thing that worked for
selenium-chrome-driver-2.48.2.jar chromedriver 2.20 selenium-java-2.48.2.jar
was
ChromeOptions options = new ChromeOptions(); System.setProperty("webdriver.chrome.args", "--disable-logging"); System.setProperty("webdriver.chrome.silentOutput", "true"); driver = new ChromeDriver(options);
To run Chrome browser with Selenium in console in completely silent mode, you should use this snippet:
options = Options()
options.headless = True
options.add_experimental_option("excludeSwitches", ["enable-logging"])
That trick will suppress any console message from either the Selenium driver or the browser itself, including the first message DevTools listening on ws://127.0.0.1
at the very start.