From 7d51a840f32cf1fac32c0d1a129463248d3035df Mon Sep 17 00:00:00 2001 From: Tobias Lidskog Date: Mon, 3 Mar 2014 00:17:44 +0100 Subject: [PATCH] Add property for silencing chromedriver The Java property "webdriver.chrome.silentOutput" is now used to set the default value for silent mode in chromedriver using the ChromeDriverService class. This is analogous to the existing system property for controlling verbose mode. Signed-off-by: Andreas Tolfsen --- .../org/openqa/selenium/chrome/ChromeDriverService.java | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/java/client/src/org/openqa/selenium/chrome/ChromeDriverService.java b/java/client/src/org/openqa/selenium/chrome/ChromeDriverService.java index b5576342b4e69..acb9bbecf7a1c 100644 --- a/java/client/src/org/openqa/selenium/chrome/ChromeDriverService.java +++ b/java/client/src/org/openqa/selenium/chrome/ChromeDriverService.java @@ -57,6 +57,13 @@ public class ChromeDriverService extends DriverService { public static final String CHROME_DRIVER_VERBOSE_LOG_PROPERTY = "webdriver.chrome.verboseLogging"; + /** + * Boolean system property that defines whether the ChromeDriver executable should be started + * in silent mode. + */ + public static final String CHROME_DRIVER_SILENT_OUTPUT_PROPERTY = + "webdriver.chrome.silentOutput"; + /** * * @param executable The chromedriver executable. @@ -96,7 +103,7 @@ public static class Builder { String chromeLogFile = System.getProperty(CHROME_DRIVER_LOG_PROPERTY); private File logFile = chromeLogFile == null ? null : new File(chromeLogFile); private boolean verbose = Boolean.getBoolean(CHROME_DRIVER_VERBOSE_LOG_PROPERTY); - private boolean silent; + private boolean silent = Boolean.getBoolean(CHROME_DRIVER_SILENT_OUTPUT_PROPERTY); /** * Sets which driver executable the builder will use.