Use the builder's FirefoxBinary, if specified.
In particular, don't construct a new, default FirefoxBinary if a specific FirefoxBinary was already provided.
@@ -171,8 +171,11 @@ public Builder withProfile(FirefoxProfile profile) {
@Override
protected File findDefaultExecutable() {
+ if (binary == null) {
return new FirefoxBinary().getFile();
}
+ return binary.getFile();
+ }
@Override
protected ImmutableList<String> createArgs() {
