Feature and motivation
Chromium has implemented a number of BiDi features, but it is not currently implementing the interface, so they can not be used: https://wpt.fyi/results/webdriver/tests/bidi?label=experimental&label=master&aligned
As part of this, we should also add a method to the Options class to set webSocketUrl to true as part of enabling BiDi. https://w3c.github.io/webdriver-bidi/#establishing
Usage example
ChromeOptions options = new ChromeOptions();
options.setCapability("webSocketUrl", true);
driver = new ChromeDriver();
try (LogInspector logInspector = new LogInspector(driver)) {
CompletableFuture<ConsoleLogEntry> future = new CompletableFuture<>();
logInspector.onConsoleLog(future::complete);
driver.get("https://www.selenium.dev/selenium/web/bidi/logEntryAdded.html");
driver.findElement(By.id("consoleLog")).click();
ConsoleLogEntry logEntry = future.get(5, TimeUnit.SECONDS);
}
Feature and motivation
Chromium has implemented a number of BiDi features, but it is not currently implementing the interface, so they can not be used: https://wpt.fyi/results/webdriver/tests/bidi?label=experimental&label=master&aligned
As part of this, we should also add a method to the Options class to set
webSocketUrltotrueas part of enabling BiDi. https://w3c.github.io/webdriver-bidi/#establishingUsage example