Skip to content

Commit 2b4a66d

Browse files
committed
[java] Only try and set the firefox binary from the DriverFinder result if necessary
1 parent c620c37 commit 2b4a66d

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

java/src/org/openqa/selenium/firefox/FirefoxDriver.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,9 @@ private static FirefoxDriverCommandExecutor generateExecutor(
140140
if (service.getExecutable() == null) {
141141
Result result = DriverFinder.getPath(service, options);
142142
service.setExecutable(result.getDriverPath());
143-
options.setBinary(result.getBrowserPath());
143+
if (result.getBrowserPath() != null && !options.getBinaryOrNull().isPresent()) {
144+
options.setBinary(result.getBrowserPath());
145+
}
144146
}
145147
return new FirefoxDriverCommandExecutor(service, clientConfig);
146148
}

0 commit comments

Comments
 (0)