feat: Add support for Chrome DevTools Protocol (CDPSession) (#1329)
Add new methods BrowserContext.newCDPSession and Browser.newBrowserCDPSession to create a Chrome DevTools Protocol[1] session for the page and browser respectively. Fixes #823 [1] https://chromedevtools.github.io/devtools-protocol/
This commit is contained in:
@@ -964,7 +964,7 @@ class Interface extends TypeDefinition {
|
||||
if (asList("Page", "Frame", "ElementHandle", "Locator", "APIRequest", "Browser", "BrowserContext", "BrowserType", "Route", "Request", "Response", "JSHandle", "ConsoleMessage", "APIResponse", "Playwright").contains(jsonName)) {
|
||||
output.add("import java.util.*;");
|
||||
}
|
||||
if (asList("Page", "Browser", "BrowserContext", "WebSocket", "Worker").contains(jsonName)) {
|
||||
if (asList("Page", "Browser", "BrowserContext", "WebSocket", "Worker", "CDPSession").contains(jsonName)) {
|
||||
output.add("import java.util.function.Consumer;");
|
||||
}
|
||||
if (asList("Page", "BrowserContext").contains(jsonName)) {
|
||||
@@ -977,6 +977,9 @@ class Interface extends TypeDefinition {
|
||||
if (asList("Page", "Frame", "FrameLocator", "Locator", "Browser", "BrowserType", "BrowserContext", "PageAssertions", "LocatorAssertions").contains(jsonName)) {
|
||||
output.add("import java.util.regex.Pattern;");
|
||||
}
|
||||
if ("CDPSession".equals(jsonName)) {
|
||||
output.add("import com.google.gson.JsonObject;");
|
||||
}
|
||||
if ("PlaywrightAssertions".equals(jsonName)) {
|
||||
output.add("import com.microsoft.playwright.APIResponse;");
|
||||
output.add("import com.microsoft.playwright.Locator;");
|
||||
|
||||
Reference in New Issue
Block a user