1919
2020import static org .junit .Assert .assertEquals ;
2121import static org .junit .Assert .assertNotNull ;
22- import static org .junit .Assert .fail ;
2322import static org .mockito .Matchers .any ;
2423import static org .mockito .Mockito .atLeastOnce ;
2524import static org .mockito .Mockito .never ;
@@ -65,7 +64,7 @@ public void canStartDriverWithNoParameters() {
6564 public void canStartDriverWithSpecifiedBinary () throws IOException {
6665 FirefoxBinary binary = spy (new FirefoxBinary ());
6766
68- localDriver = new FirefoxDriver (binary );
67+ localDriver = new FirefoxDriver (new FirefoxOptions (). setBinary ( binary ) );
6968
7069 verifyItIsMarionette (localDriver );
7170 verify (binary , atLeastOnce ()).getPath ();
@@ -92,7 +91,7 @@ public void canStartDriverWithSpecifiedBinaryAndProfile() throws IOException {
9291 profile .setPreference ("browser.startup.page" , 1 );
9392 profile .setPreference ("browser.startup.homepage" , pages .xhtmlTestPage );
9493
95- localDriver = new FirefoxDriver (binary , profile );
94+ localDriver = new FirefoxDriver (new FirefoxOptions (). setBinary ( binary ). setProfile ( profile ) );
9695 wait .until ($ -> "XHTML Test Page" .equals (localDriver .getTitle ()));
9796
9897 verifyItIsMarionette (localDriver );
@@ -162,7 +161,10 @@ public void canUseSameProfileInCapabilitiesAndDirectly() {
162161 DesiredCapabilities caps = new DesiredCapabilities ();
163162 caps .setCapability (FirefoxDriver .PROFILE , profile );
164163
165- localDriver = new FirefoxDriver (new FirefoxBinary (), profile , caps );
164+ localDriver = new FirefoxDriver (
165+ new FirefoxOptions ()
166+ .setProfile (profile )
167+ .addDesiredCapabilities (caps ));
166168 wait .until ($ -> "XHTML Test Page" .equals (localDriver .getTitle ()));
167169
168170 verifyItIsMarionette (localDriver );
@@ -179,7 +181,11 @@ public void canPassCapabilitiesBinaryAndProfileSeparately() throws IOException {
179181 DesiredCapabilities capabilities = new DesiredCapabilities ();
180182 capabilities .setCapability (CapabilityType .PAGE_LOAD_STRATEGY , "none" );
181183
182- localDriver = new FirefoxDriver (binary , profile , capabilities );
184+ localDriver = new FirefoxDriver (
185+ new FirefoxOptions ()
186+ .setBinary (binary )
187+ .setProfile (profile )
188+ .addDesiredCapabilities (capabilities ));
183189 wait .until ($ -> "XHTML Test Page" .equals (localDriver .getTitle ()));
184190
185191 verifyItIsMarionette (localDriver );
0 commit comments