Skip to content

Commit 7d51a84

Browse files
tobliandreastt
authored andcommitted
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 <ato@mozilla.com>
1 parent b213090 commit 7d51a84

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

Diff for: java/client/src/org/openqa/selenium/chrome/ChromeDriverService.java

+8-1
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,13 @@ public class ChromeDriverService extends DriverService {
5757
public static final String CHROME_DRIVER_VERBOSE_LOG_PROPERTY =
5858
"webdriver.chrome.verboseLogging";
5959

60+
/**
61+
* Boolean system property that defines whether the ChromeDriver executable should be started
62+
* in silent mode.
63+
*/
64+
public static final String CHROME_DRIVER_SILENT_OUTPUT_PROPERTY =
65+
"webdriver.chrome.silentOutput";
66+
6067
/**
6168
*
6269
* @param executable The chromedriver executable.
@@ -96,7 +103,7 @@ public static class Builder {
96103
String chromeLogFile = System.getProperty(CHROME_DRIVER_LOG_PROPERTY);
97104
private File logFile = chromeLogFile == null ? null : new File(chromeLogFile);
98105
private boolean verbose = Boolean.getBoolean(CHROME_DRIVER_VERBOSE_LOG_PROPERTY);
99-
private boolean silent;
106+
private boolean silent = Boolean.getBoolean(CHROME_DRIVER_SILENT_OUTPUT_PROPERTY);
100107

101108
/**
102109
* Sets which driver executable the builder will use.

0 commit comments

Comments
 (0)