1
0
mirror of synced 2026-08-05 15:06:54 +00:00

feat: roll driver, implement locator (#532)

This commit is contained in:
Yury Semikhatsky
2021-07-28 09:24:31 -07:00
committed by GitHub
parent 79529a7239
commit 3631357a35
12 changed files with 3493 additions and 63 deletions
@@ -249,10 +249,12 @@ class TypeRef extends Element {
customTypeNames.put("BrowserContext.addCookies.cookies", "Cookie");
customTypeNames.put("BrowserContext.cookies", "Cookie");
customTypeNames.put("Locator.selectOption.values", "SelectOption");
customTypeNames.put("ElementHandle.selectOption.values", "SelectOption");
customTypeNames.put("Frame.selectOption.values", "SelectOption");
customTypeNames.put("Page.selectOption.values", "SelectOption");
customTypeNames.put("Locator.setInputFiles.files", "FilePayload");
customTypeNames.put("ElementHandle.setInputFiles.files", "FilePayload");
customTypeNames.put("FileChooser.setFiles.files", "FilePayload");
customTypeNames.put("Frame.setInputFiles.files", "FilePayload");
@@ -866,7 +868,7 @@ class Interface extends TypeDefinition {
if ("Playwright".equals(jsonName)) {
output.add("import com.microsoft.playwright.impl.PlaywrightImpl;");
}
if (asList("Page", "Request", "Response", "FileChooser", "Frame", "ElementHandle", "Browser", "BrowserContext", "BrowserType", "Mouse", "Keyboard").contains(jsonName)) {
if (asList("Page", "Request", "Response", "FileChooser", "Frame", "ElementHandle", "Locator", "Browser", "BrowserContext", "BrowserType", "Mouse", "Keyboard").contains(jsonName)) {
output.add("import com.microsoft.playwright.options.*;");
}
if (jsonName.equals("Route")) {
@@ -875,7 +877,7 @@ class Interface extends TypeDefinition {
if ("Download".equals(jsonName)) {
output.add("import java.io.InputStream;");
}
if (asList("Page", "Frame", "ElementHandle", "FileChooser", "Browser", "BrowserContext", "BrowserType", "Download", "Route", "Selectors", "Tracing", "Video").contains(jsonName)) {
if (asList("Page", "Frame", "ElementHandle", "Locator", "FileChooser", "Browser", "BrowserContext", "BrowserType", "Download", "Route", "Selectors", "Tracing", "Video").contains(jsonName)) {
output.add("import java.nio.file.Path;");
}
output.add("import java.util.*;");