|
18 | 18 | package org.openqa.selenium.firefox;
|
19 | 19 |
|
20 | 20 | import com.google.common.collect.ImmutableMap;
|
| 21 | + |
21 | 22 | import org.junit.jupiter.api.Test;
|
22 | 23 | import org.junit.jupiter.api.Timeout;
|
23 | 24 | import org.mockito.ArgumentMatchers;
|
|
31 | 32 | import org.openqa.selenium.ParallelTestRunner;
|
32 | 33 | import org.openqa.selenium.ParallelTestRunner.Worker;
|
33 | 34 | import org.openqa.selenium.WebDriver;
|
34 |
| -import org.openqa.selenium.WebDriverException; |
35 | 35 | import org.openqa.selenium.WebElement;
|
36 | 36 | import org.openqa.selenium.build.InProject;
|
37 | 37 | import org.openqa.selenium.remote.CapabilityType;
|
|
64 | 64 |
|
65 | 65 | import static org.assertj.core.api.Assertions.assertThat;
|
66 | 66 | import static org.assertj.core.api.Assertions.assertThatExceptionOfType;
|
67 |
| -import static org.junit.jupiter.api.Assumptions.assumeTrue; |
68 | 67 | import static org.junit.jupiter.api.Assertions.assertTrue;
|
69 | 68 | import static org.junit.jupiter.api.Assertions.fail;
|
| 69 | +import static org.junit.jupiter.api.Assumptions.assumeTrue; |
70 | 70 | import static org.mockito.Mockito.atLeastOnce;
|
71 | 71 | import static org.mockito.Mockito.doThrow;
|
72 | 72 | import static org.mockito.Mockito.mock;
|
73 | 73 | import static org.mockito.Mockito.spy;
|
74 | 74 | import static org.mockito.Mockito.verify;
|
75 | 75 | import static org.openqa.selenium.WaitingConditions.elementValueToEqual;
|
76 |
| -import static org.openqa.selenium.remote.CapabilityType.ACCEPT_SSL_CERTS; |
| 76 | +import static org.openqa.selenium.remote.CapabilityType.ACCEPT_INSECURE_CERTS; |
77 | 77 | import static org.openqa.selenium.support.ui.ExpectedConditions.titleIs;
|
78 | 78 | import static org.openqa.selenium.testing.drivers.Browser.FIREFOX;
|
79 | 79 |
|
@@ -358,13 +358,10 @@ public void shouldBeAbleToPassCommandLineOptions() {
|
358 | 358 |
|
359 | 359 | @Test
|
360 | 360 | @NoDriverBeforeTest
|
361 |
| - public void canBlockInvalidSslCertificates() { |
362 |
| - FirefoxProfile profile = new FirefoxProfile(); |
363 |
| - profile.setAcceptUntrustedCertificates(false); |
364 |
| - |
365 |
| - localDriver = new WebDriverBuilder().get(new FirefoxOptions().setProfile(profile)); |
| 361 | + public void canBlockInsecureCerts() { |
| 362 | + localDriver = new WebDriverBuilder().get(new FirefoxOptions().setAcceptInsecureCerts(false)); |
366 | 363 | Capabilities caps = ((HasCapabilities) localDriver).getCapabilities();
|
367 |
| - assertThat(caps.is(ACCEPT_SSL_CERTS)).isFalse(); |
| 364 | + assertThat(caps.is(ACCEPT_INSECURE_CERTS)).isFalse(); |
368 | 365 | }
|
369 | 366 |
|
370 | 367 | @Test
|
|
0 commit comments