Skip to content

Commit

Permalink
GeckoDriverService always launches GeckoDriver. (#2808)
Browse files Browse the repository at this point in the history
GeckoDriver can find Firefox using its own logic (either on the PATH or specified in a capability).
  • Loading branch information
DrMarcII authored and lukeis committed Sep 21, 2016
1 parent 0fce43e commit 12d92aa
Showing 1 changed file with 8 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -101,8 +101,14 @@ protected ImmutableList<String> createArgs() {
if (getLogFile() != null) {
argsBuilder.add(String.format("--log-file=\"%s\"", getLogFile().getAbsolutePath()));
}
argsBuilder.add("-b");
argsBuilder.add(new Executable(null).getPath());
try {
Executable firefoxExe = new Executable(null);
argsBuilder.add("-b");
argsBuilder.add(firefoxExe.getPath());
} catch (WebDriverException e) {
// Unable to find Firefox. GeckoDriver will be responsible for finding
// Firefox on the PATH or via a capability.
}
return argsBuilder.build();
}

Expand Down

0 comments on commit 12d92aa

Please sign in to comment.