@@ -110,6 +110,10 @@ public class RemoteWebDriver
110110 TakesScreenshot {
111111
112112 private static final Logger LOG = Logger .getLogger (RemoteWebDriver .class .getName ());
113+
114+ /** Boolean system property that defines whether the tracing is enabled or not. */
115+ private static final String WEBDRIVER_REMOTE_ENABLE_TRACING = "webdriver.remote.enableTracing" ;
116+
113117 private final ElementLocation elementLocation = new ElementLocation ();
114118 private Level level = Level .FINE ;
115119 private ErrorHandler errorHandler = new ErrorHandler ();
@@ -132,7 +136,10 @@ protected RemoteWebDriver() {
132136 }
133137
134138 public RemoteWebDriver (Capabilities capabilities ) {
135- this (getDefaultServerURL (), Require .nonNull ("Capabilities" , capabilities ), true );
139+ this (
140+ getDefaultServerURL (),
141+ Require .nonNull ("Capabilities" , capabilities ),
142+ Boolean .parseBoolean (System .getProperty (WEBDRIVER_REMOTE_ENABLE_TRACING , "true" )));
136143 }
137144
138145 public RemoteWebDriver (Capabilities capabilities , boolean enableTracing ) {
@@ -141,7 +148,9 @@ public RemoteWebDriver(Capabilities capabilities, boolean enableTracing) {
141148
142149 public RemoteWebDriver (URL remoteAddress , Capabilities capabilities ) {
143150 this (
144- createExecutor (Require .nonNull ("Server URL" , remoteAddress ), true ),
151+ createExecutor (
152+ Require .nonNull ("Server URL" , remoteAddress ),
153+ Boolean .parseBoolean (System .getProperty (WEBDRIVER_REMOTE_ENABLE_TRACING , "true" ))),
145154 Require .nonNull ("Capabilities" , capabilities ));
146155 }
147156
0 commit comments