Skip to content

Commit 034a582

Browse files
committed
[java] Setting proxy in SM only when it is needed.
Fixes #14162
1 parent abdaa75 commit 034a582

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

Diff for: java/src/org/openqa/selenium/remote/service/DriverFinder.java

+3-1
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,9 @@ private List<String> toArguments() {
148148
}
149149

150150
Proxy proxy = Proxy.extractFrom(options);
151-
if (proxy != null) {
151+
if (proxy != null
152+
&& proxy.getProxyType() != Proxy.ProxyType.DIRECT
153+
&& proxy.getProxyType() != Proxy.ProxyType.AUTODETECT) {
152154
arguments.add("--proxy");
153155
if (proxy.getSslProxy() != null) {
154156
arguments.add(proxy.getSslProxy());

0 commit comments

Comments
 (0)