Java/Selenium: Still getting "ChromeDriver was started successfully" message after disabling logging
You can redirect the output to a file or just discard it:
// redirect console output from chromedriver to the file chromedriver_log.txt in the target folder DriverService.Builder<ChromeDriverService, ChromeDriverService.Builder> serviceBuilder = new ChromeDriverService.Builder(); ChromeDriverService chromeDriverService = serviceBuilder.build(); chromeDriverService.sendOutputTo(new FileOutputStream("target/chromedriver_log.txt", true)); webDriver = new ChromeDriver(chromeDriverService, options);
If you want to just discard the output then use NullOutputStream.NULL_OUTPUT_STREAM
insted off new FileOutputStream("target/chromedriver_log.txt", true)
I have found that the "ChromeDriver was started successfully" message comes from this line at the ChromeDriver binary:
printf("%s was started successfully.\n", kChromeDriverProductShortName);
Maybe this printf
statement that ends in the standard output, can be redirected somehow.