|
39 | 39 | import static org.openqa.selenium.devtools.events.CdpEventTypes.domMutation;
|
40 | 40 | import static org.openqa.selenium.remote.http.Contents.utf8String;
|
41 | 41 |
|
42 |
| -public class BidiApiRemotewebdriverTest { |
43 |
| - |
44 |
| - private static URL gridUrl; |
| 42 | +public class BidiApiRemoteWebdriverTest { |
45 | 43 |
|
46 | 44 | private WebDriver driver;
|
47 | 45 |
|
48 | 46 | @BeforeEach
|
49 | 47 | public void setup() throws MalformedURLException {
|
50 | 48 | int port = PortProber.findFreePort();
|
51 |
| - Main.main(new String[] { "standalone", "--port", String.valueOf(port) }); |
| 49 | + Main.main(new String[] { "standalone", "--port", String.valueOf(port), "--selenium-manager", "true" }); |
52 | 50 |
|
53 |
| - gridUrl = new URL(String.format("http://localhost:%d/", port)); |
| 51 | + URL gridUrl = new URL(String.format("http://localhost:%d/", port)); |
54 | 52 | ChromeOptions options = new ChromeOptions();
|
55 | 53 | driver = new RemoteWebDriver(gridUrl, options);
|
56 | 54 | }
|
@@ -189,7 +187,7 @@ public void testNetworkInterceptor() {
|
189 | 187 | DevTools devTools = ((HasDevTools) driver).getDevTools();
|
190 | 188 | devTools.createSession();
|
191 | 189 |
|
192 |
| - try (NetworkInterceptor interceptor = new NetworkInterceptor( |
| 190 | + try (NetworkInterceptor ignore = new NetworkInterceptor( |
193 | 191 | driver,
|
194 | 192 | Route.matching(req -> req.getUri().contains("google"))
|
195 | 193 | .to(() -> req -> new HttpResponse()
|
|
0 commit comments