diff --git a/java/src/org/openqa/selenium/remote/service/DriverFinder.java b/java/src/org/openqa/selenium/remote/service/DriverFinder.java index de9a911b983c7..7216b5d9783d1 100644 --- a/java/src/org/openqa/selenium/remote/service/DriverFinder.java +++ b/java/src/org/openqa/selenium/remote/service/DriverFinder.java @@ -148,7 +148,9 @@ private List toArguments() { } Proxy proxy = Proxy.extractFrom(options); - if (proxy != null) { + if (proxy != null + && proxy.getProxyType() != Proxy.ProxyType.DIRECT + && proxy.getProxyType() != Proxy.ProxyType.AUTODETECT) { arguments.add("--proxy"); if (proxy.getSslProxy() != null) { arguments.add(proxy.getSslProxy());