File tree Expand file tree Collapse file tree 3 files changed +69
-105
lines changed
src/org/openqa/selenium/firefox
test/org/openqa/selenium/firefox Expand file tree Collapse file tree 3 files changed +69
-105
lines changed Original file line number Diff line number Diff line change @@ -175,6 +175,10 @@ public void addCommandLineOptions(String... options) {
175
175
extraOptions .addAll (Lists .newArrayList (options ));
176
176
}
177
177
178
+ void amendOptions (FirefoxOptions options ) {
179
+ options .addArguments (extraOptions );
180
+ }
181
+
178
182
protected boolean isOnLinux () {
179
183
return Platform .getCurrent ().is (Platform .LINUX );
180
184
}
Original file line number Diff line number Diff line change @@ -158,6 +158,7 @@ public boolean isLegacy() {
158
158
159
159
public FirefoxOptions setBinary (FirefoxBinary binary ) {
160
160
this .actualBinary = Preconditions .checkNotNull (binary );
161
+ binary .amendOptions (this );
161
162
this .binaryPath = null ;
162
163
return this ;
163
164
}
@@ -319,6 +320,10 @@ public FirefoxOptions setLogLevel(Level logLevel) {
319
320
}
320
321
321
322
public FirefoxOptions addDesiredCapabilities (Capabilities desiredCapabilities ) {
323
+ if (desiredCapabilities == null ) {
324
+ return this ;
325
+ }
326
+
322
327
this .desiredCapabilities .merge (desiredCapabilities );
323
328
324
329
FirefoxProfile suggestedProfile = extractProfile (desiredCapabilities );
@@ -335,6 +340,7 @@ public FirefoxOptions addDesiredCapabilities(Capabilities desiredCapabilities) {
335
340
}
336
341
profile = suggestedProfile ;
337
342
}
343
+
338
344
Object binary = desiredCapabilities .getCapability (BINARY );
339
345
if (binary != null ) {
340
346
if (binary instanceof File ) {
You can’t perform that action at this time.
0 commit comments