feat: implement setContent, make options fields public
This commit is contained in:
@@ -308,7 +308,7 @@ class Field extends Element {
|
||||
}
|
||||
|
||||
void writeTo(List<String> output, String offset) {
|
||||
output.add(offset + toJava() + ";");
|
||||
output.add(offset + "public " + toJava() + ";");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -429,7 +429,8 @@ class Enum extends TypeDefinition {
|
||||
}
|
||||
|
||||
void writeTo(List<String> output, String offset) {
|
||||
output.add(offset + "enum " + name + " { " + String.join(", ", enumValues) + "}");
|
||||
String access = parent.typeScope() instanceof NestedClass ? "public " : "";
|
||||
output.add(offset + access + "enum " + name + " { " + String.join(", ", enumValues) + "}");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -21,8 +21,8 @@ import java.util.function.BiConsumer;
|
||||
|
||||
public interface Accessibility {
|
||||
class SnapshotOptions {
|
||||
Boolean interestingOnly;
|
||||
ElementHandle root;
|
||||
public Boolean interestingOnly;
|
||||
public ElementHandle root;
|
||||
|
||||
public SnapshotOptions withInterestingOnly(Boolean interestingOnly) {
|
||||
this.interestingOnly = interestingOnly;
|
||||
|
||||
@@ -21,10 +21,10 @@ import java.util.function.BiConsumer;
|
||||
|
||||
public interface Browser {
|
||||
class NewContextOptions {
|
||||
enum ColorScheme { DARK, LIGHT, NO_PREFERENCE}
|
||||
public enum ColorScheme { DARK, LIGHT, NO_PREFERENCE}
|
||||
public class Viewport {
|
||||
int width;
|
||||
int height;
|
||||
public int width;
|
||||
public int height;
|
||||
|
||||
Viewport() {
|
||||
}
|
||||
@@ -42,9 +42,9 @@ public interface Browser {
|
||||
}
|
||||
}
|
||||
public class Geolocation {
|
||||
double latitude;
|
||||
double longitude;
|
||||
double accuracy;
|
||||
public double latitude;
|
||||
public double longitude;
|
||||
public double accuracy;
|
||||
|
||||
Geolocation() {
|
||||
}
|
||||
@@ -66,8 +66,8 @@ public interface Browser {
|
||||
}
|
||||
}
|
||||
public class HttpCredentials {
|
||||
String username;
|
||||
String password;
|
||||
public String username;
|
||||
public String password;
|
||||
|
||||
HttpCredentials() {
|
||||
}
|
||||
@@ -85,8 +85,8 @@ public interface Browser {
|
||||
}
|
||||
}
|
||||
public class VideoSize {
|
||||
int width;
|
||||
int height;
|
||||
public int width;
|
||||
public int height;
|
||||
|
||||
VideoSize() {
|
||||
}
|
||||
@@ -103,28 +103,28 @@ public interface Browser {
|
||||
return this;
|
||||
}
|
||||
}
|
||||
Boolean acceptDownloads;
|
||||
Boolean ignoreHTTPSErrors;
|
||||
Boolean bypassCSP;
|
||||
Viewport viewport;
|
||||
String userAgent;
|
||||
Integer deviceScaleFactor;
|
||||
Boolean isMobile;
|
||||
Boolean hasTouch;
|
||||
Boolean javaScriptEnabled;
|
||||
String timezoneId;
|
||||
Geolocation geolocation;
|
||||
String locale;
|
||||
List<String> permissions;
|
||||
Map<String, String> extraHTTPHeaders;
|
||||
Boolean offline;
|
||||
HttpCredentials httpCredentials;
|
||||
ColorScheme colorScheme;
|
||||
Logger logger;
|
||||
String relativeArtifactsPath;
|
||||
Boolean recordVideos;
|
||||
VideoSize videoSize;
|
||||
Boolean recordTrace;
|
||||
public Boolean acceptDownloads;
|
||||
public Boolean ignoreHTTPSErrors;
|
||||
public Boolean bypassCSP;
|
||||
public Viewport viewport;
|
||||
public String userAgent;
|
||||
public Integer deviceScaleFactor;
|
||||
public Boolean isMobile;
|
||||
public Boolean hasTouch;
|
||||
public Boolean javaScriptEnabled;
|
||||
public String timezoneId;
|
||||
public Geolocation geolocation;
|
||||
public String locale;
|
||||
public List<String> permissions;
|
||||
public Map<String, String> extraHTTPHeaders;
|
||||
public Boolean offline;
|
||||
public HttpCredentials httpCredentials;
|
||||
public ColorScheme colorScheme;
|
||||
public Logger logger;
|
||||
public String relativeArtifactsPath;
|
||||
public Boolean recordVideos;
|
||||
public VideoSize videoSize;
|
||||
public Boolean recordTrace;
|
||||
|
||||
public NewContextOptions withAcceptDownloads(Boolean acceptDownloads) {
|
||||
this.acceptDownloads = acceptDownloads;
|
||||
@@ -216,10 +216,10 @@ public interface Browser {
|
||||
}
|
||||
}
|
||||
class NewPageOptions {
|
||||
enum ColorScheme { DARK, LIGHT, NO_PREFERENCE}
|
||||
public enum ColorScheme { DARK, LIGHT, NO_PREFERENCE}
|
||||
public class Viewport {
|
||||
int width;
|
||||
int height;
|
||||
public int width;
|
||||
public int height;
|
||||
|
||||
Viewport() {
|
||||
}
|
||||
@@ -237,9 +237,9 @@ public interface Browser {
|
||||
}
|
||||
}
|
||||
public class Geolocation {
|
||||
double latitude;
|
||||
double longitude;
|
||||
double accuracy;
|
||||
public double latitude;
|
||||
public double longitude;
|
||||
public double accuracy;
|
||||
|
||||
Geolocation() {
|
||||
}
|
||||
@@ -261,8 +261,8 @@ public interface Browser {
|
||||
}
|
||||
}
|
||||
public class HttpCredentials {
|
||||
String username;
|
||||
String password;
|
||||
public String username;
|
||||
public String password;
|
||||
|
||||
HttpCredentials() {
|
||||
}
|
||||
@@ -280,8 +280,8 @@ public interface Browser {
|
||||
}
|
||||
}
|
||||
public class VideoSize {
|
||||
int width;
|
||||
int height;
|
||||
public int width;
|
||||
public int height;
|
||||
|
||||
VideoSize() {
|
||||
}
|
||||
@@ -298,28 +298,28 @@ public interface Browser {
|
||||
return this;
|
||||
}
|
||||
}
|
||||
Boolean acceptDownloads;
|
||||
Boolean ignoreHTTPSErrors;
|
||||
Boolean bypassCSP;
|
||||
Viewport viewport;
|
||||
String userAgent;
|
||||
Integer deviceScaleFactor;
|
||||
Boolean isMobile;
|
||||
Boolean hasTouch;
|
||||
Boolean javaScriptEnabled;
|
||||
String timezoneId;
|
||||
Geolocation geolocation;
|
||||
String locale;
|
||||
List<String> permissions;
|
||||
Map<String, String> extraHTTPHeaders;
|
||||
Boolean offline;
|
||||
HttpCredentials httpCredentials;
|
||||
ColorScheme colorScheme;
|
||||
Logger logger;
|
||||
String relativeArtifactsPath;
|
||||
Boolean recordVideos;
|
||||
VideoSize videoSize;
|
||||
Boolean recordTrace;
|
||||
public Boolean acceptDownloads;
|
||||
public Boolean ignoreHTTPSErrors;
|
||||
public Boolean bypassCSP;
|
||||
public Viewport viewport;
|
||||
public String userAgent;
|
||||
public Integer deviceScaleFactor;
|
||||
public Boolean isMobile;
|
||||
public Boolean hasTouch;
|
||||
public Boolean javaScriptEnabled;
|
||||
public String timezoneId;
|
||||
public Geolocation geolocation;
|
||||
public String locale;
|
||||
public List<String> permissions;
|
||||
public Map<String, String> extraHTTPHeaders;
|
||||
public Boolean offline;
|
||||
public HttpCredentials httpCredentials;
|
||||
public ColorScheme colorScheme;
|
||||
public Logger logger;
|
||||
public String relativeArtifactsPath;
|
||||
public Boolean recordVideos;
|
||||
public VideoSize videoSize;
|
||||
public Boolean recordTrace;
|
||||
|
||||
public NewPageOptions withAcceptDownloads(Boolean acceptDownloads) {
|
||||
this.acceptDownloads = acceptDownloads;
|
||||
|
||||
@@ -21,7 +21,7 @@ import java.util.function.BiConsumer;
|
||||
|
||||
public interface BrowserContext {
|
||||
class GrantPermissionsOptions {
|
||||
String origin;
|
||||
public String origin;
|
||||
|
||||
public GrantPermissionsOptions withOrigin(String origin) {
|
||||
this.origin = origin;
|
||||
@@ -29,9 +29,9 @@ public interface BrowserContext {
|
||||
}
|
||||
}
|
||||
class Geolocation {
|
||||
int latitude;
|
||||
int longitude;
|
||||
Integer accuracy;
|
||||
public int latitude;
|
||||
public int longitude;
|
||||
public Integer accuracy;
|
||||
|
||||
public Geolocation withLatitude(int latitude) {
|
||||
this.latitude = latitude;
|
||||
@@ -47,8 +47,8 @@ public interface BrowserContext {
|
||||
}
|
||||
}
|
||||
class HTTPCredentials {
|
||||
String username;
|
||||
String password;
|
||||
public String username;
|
||||
public String password;
|
||||
|
||||
public HTTPCredentials withUsername(String username) {
|
||||
this.username = username;
|
||||
|
||||
@@ -21,10 +21,10 @@ import java.util.function.BiConsumer;
|
||||
|
||||
public interface BrowserType {
|
||||
class ConnectOptions {
|
||||
String wsEndpoint;
|
||||
Integer slowMo;
|
||||
Logger logger;
|
||||
Integer timeout;
|
||||
public String wsEndpoint;
|
||||
public Integer slowMo;
|
||||
public Logger logger;
|
||||
public Integer timeout;
|
||||
|
||||
public ConnectOptions withWsEndpoint(String wsEndpoint) {
|
||||
this.wsEndpoint = wsEndpoint;
|
||||
@@ -45,10 +45,10 @@ public interface BrowserType {
|
||||
}
|
||||
class LaunchOptions {
|
||||
public class Proxy {
|
||||
String server;
|
||||
String bypass;
|
||||
String username;
|
||||
String password;
|
||||
public String server;
|
||||
public String bypass;
|
||||
public String username;
|
||||
public String password;
|
||||
|
||||
Proxy() {
|
||||
}
|
||||
@@ -73,23 +73,23 @@ public interface BrowserType {
|
||||
return this;
|
||||
}
|
||||
}
|
||||
Boolean headless;
|
||||
String executablePath;
|
||||
List<String> args;
|
||||
Boolean ignoreDefaultArgs;
|
||||
Proxy proxy;
|
||||
String downloadsPath;
|
||||
String artifactsPath;
|
||||
Boolean chromiumSandbox;
|
||||
String firefoxUserPrefs;
|
||||
Boolean handleSIGINT;
|
||||
Boolean handleSIGTERM;
|
||||
Boolean handleSIGHUP;
|
||||
Logger logger;
|
||||
Integer timeout;
|
||||
String env;
|
||||
Boolean devtools;
|
||||
Integer slowMo;
|
||||
public Boolean headless;
|
||||
public String executablePath;
|
||||
public List<String> args;
|
||||
public Boolean ignoreDefaultArgs;
|
||||
public Proxy proxy;
|
||||
public String downloadsPath;
|
||||
public String artifactsPath;
|
||||
public Boolean chromiumSandbox;
|
||||
public String firefoxUserPrefs;
|
||||
public Boolean handleSIGINT;
|
||||
public Boolean handleSIGTERM;
|
||||
public Boolean handleSIGHUP;
|
||||
public Logger logger;
|
||||
public Integer timeout;
|
||||
public String env;
|
||||
public Boolean devtools;
|
||||
public Integer slowMo;
|
||||
|
||||
public LaunchOptions withHeadless(Boolean headless) {
|
||||
this.headless = headless;
|
||||
@@ -161,12 +161,12 @@ public interface BrowserType {
|
||||
}
|
||||
}
|
||||
class LaunchPersistentContextOptions {
|
||||
enum ColorScheme { DARK, LIGHT, NO_PREFERENCE}
|
||||
public enum ColorScheme { DARK, LIGHT, NO_PREFERENCE}
|
||||
public class Proxy {
|
||||
String server;
|
||||
String bypass;
|
||||
String username;
|
||||
String password;
|
||||
public String server;
|
||||
public String bypass;
|
||||
public String username;
|
||||
public String password;
|
||||
|
||||
Proxy() {
|
||||
}
|
||||
@@ -192,8 +192,8 @@ public interface BrowserType {
|
||||
}
|
||||
}
|
||||
public class Viewport {
|
||||
int width;
|
||||
int height;
|
||||
public int width;
|
||||
public int height;
|
||||
|
||||
Viewport() {
|
||||
}
|
||||
@@ -211,9 +211,9 @@ public interface BrowserType {
|
||||
}
|
||||
}
|
||||
public class Geolocation {
|
||||
double latitude;
|
||||
double longitude;
|
||||
double accuracy;
|
||||
public double latitude;
|
||||
public double longitude;
|
||||
public double accuracy;
|
||||
|
||||
Geolocation() {
|
||||
}
|
||||
@@ -235,8 +235,8 @@ public interface BrowserType {
|
||||
}
|
||||
}
|
||||
public class HttpCredentials {
|
||||
String username;
|
||||
String password;
|
||||
public String username;
|
||||
public String password;
|
||||
|
||||
HttpCredentials() {
|
||||
}
|
||||
@@ -254,8 +254,8 @@ public interface BrowserType {
|
||||
}
|
||||
}
|
||||
public class VideoSize {
|
||||
int width;
|
||||
int height;
|
||||
public int width;
|
||||
public int height;
|
||||
|
||||
VideoSize() {
|
||||
}
|
||||
@@ -272,43 +272,43 @@ public interface BrowserType {
|
||||
return this;
|
||||
}
|
||||
}
|
||||
Boolean headless;
|
||||
String executablePath;
|
||||
List<String> args;
|
||||
String ignoreDefaultArgs;
|
||||
Proxy proxy;
|
||||
Boolean acceptDownloads;
|
||||
String downloadsPath;
|
||||
String artifactsPath;
|
||||
Boolean chromiumSandbox;
|
||||
Boolean handleSIGINT;
|
||||
Boolean handleSIGTERM;
|
||||
Boolean handleSIGHUP;
|
||||
Logger logger;
|
||||
Integer timeout;
|
||||
String env;
|
||||
Boolean devtools;
|
||||
Integer slowMo;
|
||||
Boolean ignoreHTTPSErrors;
|
||||
Boolean bypassCSP;
|
||||
Viewport viewport;
|
||||
String userAgent;
|
||||
Integer deviceScaleFactor;
|
||||
Boolean isMobile;
|
||||
Boolean hasTouch;
|
||||
Boolean javaScriptEnabled;
|
||||
String timezoneId;
|
||||
Geolocation geolocation;
|
||||
String locale;
|
||||
List<String> permissions;
|
||||
Map<String, String> extraHTTPHeaders;
|
||||
Boolean offline;
|
||||
HttpCredentials httpCredentials;
|
||||
ColorScheme colorScheme;
|
||||
String relativeArtifactsPath;
|
||||
Boolean recordVideos;
|
||||
VideoSize videoSize;
|
||||
Boolean recordTrace;
|
||||
public Boolean headless;
|
||||
public String executablePath;
|
||||
public List<String> args;
|
||||
public String ignoreDefaultArgs;
|
||||
public Proxy proxy;
|
||||
public Boolean acceptDownloads;
|
||||
public String downloadsPath;
|
||||
public String artifactsPath;
|
||||
public Boolean chromiumSandbox;
|
||||
public Boolean handleSIGINT;
|
||||
public Boolean handleSIGTERM;
|
||||
public Boolean handleSIGHUP;
|
||||
public Logger logger;
|
||||
public Integer timeout;
|
||||
public String env;
|
||||
public Boolean devtools;
|
||||
public Integer slowMo;
|
||||
public Boolean ignoreHTTPSErrors;
|
||||
public Boolean bypassCSP;
|
||||
public Viewport viewport;
|
||||
public String userAgent;
|
||||
public Integer deviceScaleFactor;
|
||||
public Boolean isMobile;
|
||||
public Boolean hasTouch;
|
||||
public Boolean javaScriptEnabled;
|
||||
public String timezoneId;
|
||||
public Geolocation geolocation;
|
||||
public String locale;
|
||||
public List<String> permissions;
|
||||
public Map<String, String> extraHTTPHeaders;
|
||||
public Boolean offline;
|
||||
public HttpCredentials httpCredentials;
|
||||
public ColorScheme colorScheme;
|
||||
public String relativeArtifactsPath;
|
||||
public Boolean recordVideos;
|
||||
public VideoSize videoSize;
|
||||
public Boolean recordTrace;
|
||||
|
||||
public LaunchPersistentContextOptions withHeadless(Boolean headless) {
|
||||
this.headless = headless;
|
||||
@@ -461,10 +461,10 @@ public interface BrowserType {
|
||||
}
|
||||
class LaunchServerOptions {
|
||||
public class Proxy {
|
||||
String server;
|
||||
String bypass;
|
||||
String username;
|
||||
String password;
|
||||
public String server;
|
||||
public String bypass;
|
||||
public String username;
|
||||
public String password;
|
||||
|
||||
Proxy() {
|
||||
}
|
||||
@@ -489,23 +489,23 @@ public interface BrowserType {
|
||||
return this;
|
||||
}
|
||||
}
|
||||
Boolean headless;
|
||||
Integer port;
|
||||
String executablePath;
|
||||
List<String> args;
|
||||
String ignoreDefaultArgs;
|
||||
Proxy proxy;
|
||||
String downloadsPath;
|
||||
String artifactsPath;
|
||||
Boolean chromiumSandbox;
|
||||
String firefoxUserPrefs;
|
||||
Boolean handleSIGINT;
|
||||
Boolean handleSIGTERM;
|
||||
Boolean handleSIGHUP;
|
||||
Logger logger;
|
||||
Integer timeout;
|
||||
String env;
|
||||
Boolean devtools;
|
||||
public Boolean headless;
|
||||
public Integer port;
|
||||
public String executablePath;
|
||||
public List<String> args;
|
||||
public String ignoreDefaultArgs;
|
||||
public Proxy proxy;
|
||||
public String downloadsPath;
|
||||
public String artifactsPath;
|
||||
public Boolean chromiumSandbox;
|
||||
public String firefoxUserPrefs;
|
||||
public Boolean handleSIGINT;
|
||||
public Boolean handleSIGTERM;
|
||||
public Boolean handleSIGHUP;
|
||||
public Logger logger;
|
||||
public Integer timeout;
|
||||
public String env;
|
||||
public Boolean devtools;
|
||||
|
||||
public LaunchServerOptions withHeadless(Boolean headless) {
|
||||
this.headless = headless;
|
||||
|
||||
@@ -21,9 +21,9 @@ import java.util.function.BiConsumer;
|
||||
|
||||
public interface ChromiumBrowser {
|
||||
class StartTracingOptions {
|
||||
String path;
|
||||
Boolean screenshots;
|
||||
List<String> categories;
|
||||
public String path;
|
||||
public Boolean screenshots;
|
||||
public List<String> categories;
|
||||
|
||||
public StartTracingOptions withPath(String path) {
|
||||
this.path = path;
|
||||
@@ -39,10 +39,10 @@ public interface ChromiumBrowser {
|
||||
}
|
||||
}
|
||||
class NewContextOptions {
|
||||
enum ColorScheme { DARK, LIGHT, NO_PREFERENCE}
|
||||
public enum ColorScheme { DARK, LIGHT, NO_PREFERENCE}
|
||||
public class Viewport {
|
||||
int width;
|
||||
int height;
|
||||
public int width;
|
||||
public int height;
|
||||
|
||||
Viewport() {
|
||||
}
|
||||
@@ -60,9 +60,9 @@ public interface ChromiumBrowser {
|
||||
}
|
||||
}
|
||||
public class Geolocation {
|
||||
double latitude;
|
||||
double longitude;
|
||||
double accuracy;
|
||||
public double latitude;
|
||||
public double longitude;
|
||||
public double accuracy;
|
||||
|
||||
Geolocation() {
|
||||
}
|
||||
@@ -84,8 +84,8 @@ public interface ChromiumBrowser {
|
||||
}
|
||||
}
|
||||
public class HttpCredentials {
|
||||
String username;
|
||||
String password;
|
||||
public String username;
|
||||
public String password;
|
||||
|
||||
HttpCredentials() {
|
||||
}
|
||||
@@ -103,8 +103,8 @@ public interface ChromiumBrowser {
|
||||
}
|
||||
}
|
||||
public class VideoSize {
|
||||
int width;
|
||||
int height;
|
||||
public int width;
|
||||
public int height;
|
||||
|
||||
VideoSize() {
|
||||
}
|
||||
@@ -121,28 +121,28 @@ public interface ChromiumBrowser {
|
||||
return this;
|
||||
}
|
||||
}
|
||||
Boolean acceptDownloads;
|
||||
Boolean ignoreHTTPSErrors;
|
||||
Boolean bypassCSP;
|
||||
Viewport viewport;
|
||||
String userAgent;
|
||||
Integer deviceScaleFactor;
|
||||
Boolean isMobile;
|
||||
Boolean hasTouch;
|
||||
Boolean javaScriptEnabled;
|
||||
String timezoneId;
|
||||
Geolocation geolocation;
|
||||
String locale;
|
||||
List<String> permissions;
|
||||
Map<String, String> extraHTTPHeaders;
|
||||
Boolean offline;
|
||||
HttpCredentials httpCredentials;
|
||||
ColorScheme colorScheme;
|
||||
Logger logger;
|
||||
String relativeArtifactsPath;
|
||||
Boolean recordVideos;
|
||||
VideoSize videoSize;
|
||||
Boolean recordTrace;
|
||||
public Boolean acceptDownloads;
|
||||
public Boolean ignoreHTTPSErrors;
|
||||
public Boolean bypassCSP;
|
||||
public Viewport viewport;
|
||||
public String userAgent;
|
||||
public Integer deviceScaleFactor;
|
||||
public Boolean isMobile;
|
||||
public Boolean hasTouch;
|
||||
public Boolean javaScriptEnabled;
|
||||
public String timezoneId;
|
||||
public Geolocation geolocation;
|
||||
public String locale;
|
||||
public List<String> permissions;
|
||||
public Map<String, String> extraHTTPHeaders;
|
||||
public Boolean offline;
|
||||
public HttpCredentials httpCredentials;
|
||||
public ColorScheme colorScheme;
|
||||
public Logger logger;
|
||||
public String relativeArtifactsPath;
|
||||
public Boolean recordVideos;
|
||||
public VideoSize videoSize;
|
||||
public Boolean recordTrace;
|
||||
|
||||
public NewContextOptions withAcceptDownloads(Boolean acceptDownloads) {
|
||||
this.acceptDownloads = acceptDownloads;
|
||||
@@ -234,10 +234,10 @@ public interface ChromiumBrowser {
|
||||
}
|
||||
}
|
||||
class NewPageOptions {
|
||||
enum ColorScheme { DARK, LIGHT, NO_PREFERENCE}
|
||||
public enum ColorScheme { DARK, LIGHT, NO_PREFERENCE}
|
||||
public class Viewport {
|
||||
int width;
|
||||
int height;
|
||||
public int width;
|
||||
public int height;
|
||||
|
||||
Viewport() {
|
||||
}
|
||||
@@ -255,9 +255,9 @@ public interface ChromiumBrowser {
|
||||
}
|
||||
}
|
||||
public class Geolocation {
|
||||
double latitude;
|
||||
double longitude;
|
||||
double accuracy;
|
||||
public double latitude;
|
||||
public double longitude;
|
||||
public double accuracy;
|
||||
|
||||
Geolocation() {
|
||||
}
|
||||
@@ -279,8 +279,8 @@ public interface ChromiumBrowser {
|
||||
}
|
||||
}
|
||||
public class HttpCredentials {
|
||||
String username;
|
||||
String password;
|
||||
public String username;
|
||||
public String password;
|
||||
|
||||
HttpCredentials() {
|
||||
}
|
||||
@@ -298,8 +298,8 @@ public interface ChromiumBrowser {
|
||||
}
|
||||
}
|
||||
public class VideoSize {
|
||||
int width;
|
||||
int height;
|
||||
public int width;
|
||||
public int height;
|
||||
|
||||
VideoSize() {
|
||||
}
|
||||
@@ -316,28 +316,28 @@ public interface ChromiumBrowser {
|
||||
return this;
|
||||
}
|
||||
}
|
||||
Boolean acceptDownloads;
|
||||
Boolean ignoreHTTPSErrors;
|
||||
Boolean bypassCSP;
|
||||
Viewport viewport;
|
||||
String userAgent;
|
||||
Integer deviceScaleFactor;
|
||||
Boolean isMobile;
|
||||
Boolean hasTouch;
|
||||
Boolean javaScriptEnabled;
|
||||
String timezoneId;
|
||||
Geolocation geolocation;
|
||||
String locale;
|
||||
List<String> permissions;
|
||||
Map<String, String> extraHTTPHeaders;
|
||||
Boolean offline;
|
||||
HttpCredentials httpCredentials;
|
||||
ColorScheme colorScheme;
|
||||
Logger logger;
|
||||
String relativeArtifactsPath;
|
||||
Boolean recordVideos;
|
||||
VideoSize videoSize;
|
||||
Boolean recordTrace;
|
||||
public Boolean acceptDownloads;
|
||||
public Boolean ignoreHTTPSErrors;
|
||||
public Boolean bypassCSP;
|
||||
public Viewport viewport;
|
||||
public String userAgent;
|
||||
public Integer deviceScaleFactor;
|
||||
public Boolean isMobile;
|
||||
public Boolean hasTouch;
|
||||
public Boolean javaScriptEnabled;
|
||||
public String timezoneId;
|
||||
public Geolocation geolocation;
|
||||
public String locale;
|
||||
public List<String> permissions;
|
||||
public Map<String, String> extraHTTPHeaders;
|
||||
public Boolean offline;
|
||||
public HttpCredentials httpCredentials;
|
||||
public ColorScheme colorScheme;
|
||||
public Logger logger;
|
||||
public String relativeArtifactsPath;
|
||||
public Boolean recordVideos;
|
||||
public VideoSize videoSize;
|
||||
public Boolean recordTrace;
|
||||
|
||||
public NewPageOptions withAcceptDownloads(Boolean acceptDownloads) {
|
||||
this.acceptDownloads = acceptDownloads;
|
||||
|
||||
@@ -21,7 +21,7 @@ import java.util.function.BiConsumer;
|
||||
|
||||
public interface ChromiumBrowserContext {
|
||||
class GrantPermissionsOptions {
|
||||
String origin;
|
||||
public String origin;
|
||||
|
||||
public GrantPermissionsOptions withOrigin(String origin) {
|
||||
this.origin = origin;
|
||||
@@ -29,9 +29,9 @@ public interface ChromiumBrowserContext {
|
||||
}
|
||||
}
|
||||
class Geolocation {
|
||||
int latitude;
|
||||
int longitude;
|
||||
Integer accuracy;
|
||||
public int latitude;
|
||||
public int longitude;
|
||||
public Integer accuracy;
|
||||
|
||||
public Geolocation withLatitude(int latitude) {
|
||||
this.latitude = latitude;
|
||||
@@ -47,8 +47,8 @@ public interface ChromiumBrowserContext {
|
||||
}
|
||||
}
|
||||
class HTTPCredentials {
|
||||
String username;
|
||||
String password;
|
||||
public String username;
|
||||
public String password;
|
||||
|
||||
public HTTPCredentials withUsername(String username) {
|
||||
this.username = username;
|
||||
|
||||
@@ -21,7 +21,7 @@ import java.util.function.BiConsumer;
|
||||
|
||||
public interface ChromiumCoverage {
|
||||
class StartCSSCoverageOptions {
|
||||
Boolean resetOnNavigation;
|
||||
public Boolean resetOnNavigation;
|
||||
|
||||
public StartCSSCoverageOptions withResetOnNavigation(Boolean resetOnNavigation) {
|
||||
this.resetOnNavigation = resetOnNavigation;
|
||||
@@ -29,8 +29,8 @@ public interface ChromiumCoverage {
|
||||
}
|
||||
}
|
||||
class StartJSCoverageOptions {
|
||||
Boolean resetOnNavigation;
|
||||
Boolean reportAnonymousScripts;
|
||||
public Boolean resetOnNavigation;
|
||||
public Boolean reportAnonymousScripts;
|
||||
|
||||
public StartJSCoverageOptions withResetOnNavigation(Boolean resetOnNavigation) {
|
||||
this.resetOnNavigation = resetOnNavigation;
|
||||
|
||||
@@ -21,9 +21,9 @@ import java.util.function.BiConsumer;
|
||||
|
||||
public interface ConsoleMessage {
|
||||
class Location {
|
||||
String url;
|
||||
int lineNumber;
|
||||
int columnNumber;
|
||||
public String url;
|
||||
public int lineNumber;
|
||||
public int columnNumber;
|
||||
|
||||
public Location withUrl(String url) {
|
||||
this.url = url;
|
||||
|
||||
@@ -22,9 +22,9 @@ import java.util.function.BiConsumer;
|
||||
public interface ElementHandle {
|
||||
enum ElementState { DISABLED, ENABLED, HIDDEN, STABLE, VISIBLE}
|
||||
class CheckOptions {
|
||||
Boolean force;
|
||||
Boolean noWaitAfter;
|
||||
Integer timeout;
|
||||
public Boolean force;
|
||||
public Boolean noWaitAfter;
|
||||
public Integer timeout;
|
||||
|
||||
public CheckOptions withForce(Boolean force) {
|
||||
this.force = force;
|
||||
@@ -40,11 +40,11 @@ public interface ElementHandle {
|
||||
}
|
||||
}
|
||||
class ClickOptions {
|
||||
enum Button { LEFT, MIDDLE, RIGHT}
|
||||
enum Modifier { ALT, CONTROL, META, SHIFT}
|
||||
public enum Button { LEFT, MIDDLE, RIGHT}
|
||||
public enum Modifier { ALT, CONTROL, META, SHIFT}
|
||||
public class Position {
|
||||
int x;
|
||||
int y;
|
||||
public int x;
|
||||
public int y;
|
||||
|
||||
Position() {
|
||||
}
|
||||
@@ -61,14 +61,14 @@ public interface ElementHandle {
|
||||
return this;
|
||||
}
|
||||
}
|
||||
Button button;
|
||||
Integer clickCount;
|
||||
Integer delay;
|
||||
Position position;
|
||||
Set<Modifier> modifiers;
|
||||
Boolean force;
|
||||
Boolean noWaitAfter;
|
||||
Integer timeout;
|
||||
public Button button;
|
||||
public Integer clickCount;
|
||||
public Integer delay;
|
||||
public Position position;
|
||||
public Set<Modifier> modifiers;
|
||||
public Boolean force;
|
||||
public Boolean noWaitAfter;
|
||||
public Integer timeout;
|
||||
|
||||
public ClickOptions withButton(Button button) {
|
||||
this.button = button;
|
||||
@@ -104,11 +104,11 @@ public interface ElementHandle {
|
||||
}
|
||||
}
|
||||
class DblclickOptions {
|
||||
enum Button { LEFT, MIDDLE, RIGHT}
|
||||
enum Modifier { ALT, CONTROL, META, SHIFT}
|
||||
public enum Button { LEFT, MIDDLE, RIGHT}
|
||||
public enum Modifier { ALT, CONTROL, META, SHIFT}
|
||||
public class Position {
|
||||
int x;
|
||||
int y;
|
||||
public int x;
|
||||
public int y;
|
||||
|
||||
Position() {
|
||||
}
|
||||
@@ -125,13 +125,13 @@ public interface ElementHandle {
|
||||
return this;
|
||||
}
|
||||
}
|
||||
Button button;
|
||||
Integer delay;
|
||||
Position position;
|
||||
Set<Modifier> modifiers;
|
||||
Boolean force;
|
||||
Boolean noWaitAfter;
|
||||
Integer timeout;
|
||||
public Button button;
|
||||
public Integer delay;
|
||||
public Position position;
|
||||
public Set<Modifier> modifiers;
|
||||
public Boolean force;
|
||||
public Boolean noWaitAfter;
|
||||
public Integer timeout;
|
||||
|
||||
public DblclickOptions withButton(Button button) {
|
||||
this.button = button;
|
||||
@@ -163,8 +163,8 @@ public interface ElementHandle {
|
||||
}
|
||||
}
|
||||
class FillOptions {
|
||||
Boolean noWaitAfter;
|
||||
Integer timeout;
|
||||
public Boolean noWaitAfter;
|
||||
public Integer timeout;
|
||||
|
||||
public FillOptions withNoWaitAfter(Boolean noWaitAfter) {
|
||||
this.noWaitAfter = noWaitAfter;
|
||||
@@ -176,10 +176,10 @@ public interface ElementHandle {
|
||||
}
|
||||
}
|
||||
class HoverOptions {
|
||||
enum Modifier { ALT, CONTROL, META, SHIFT}
|
||||
public enum Modifier { ALT, CONTROL, META, SHIFT}
|
||||
public class Position {
|
||||
int x;
|
||||
int y;
|
||||
public int x;
|
||||
public int y;
|
||||
|
||||
Position() {
|
||||
}
|
||||
@@ -196,10 +196,10 @@ public interface ElementHandle {
|
||||
return this;
|
||||
}
|
||||
}
|
||||
Position position;
|
||||
Set<Modifier> modifiers;
|
||||
Boolean force;
|
||||
Integer timeout;
|
||||
public Position position;
|
||||
public Set<Modifier> modifiers;
|
||||
public Boolean force;
|
||||
public Integer timeout;
|
||||
|
||||
public Position setPosition() {
|
||||
this.position = new Position();
|
||||
@@ -219,9 +219,9 @@ public interface ElementHandle {
|
||||
}
|
||||
}
|
||||
class PressOptions {
|
||||
Integer delay;
|
||||
Boolean noWaitAfter;
|
||||
Integer timeout;
|
||||
public Integer delay;
|
||||
public Boolean noWaitAfter;
|
||||
public Integer timeout;
|
||||
|
||||
public PressOptions withDelay(Integer delay) {
|
||||
this.delay = delay;
|
||||
@@ -237,12 +237,12 @@ public interface ElementHandle {
|
||||
}
|
||||
}
|
||||
class ScreenshotOptions {
|
||||
enum Type { JPEG, PNG}
|
||||
String path;
|
||||
Type type;
|
||||
Integer quality;
|
||||
Boolean omitBackground;
|
||||
Integer timeout;
|
||||
public enum Type { JPEG, PNG}
|
||||
public String path;
|
||||
public Type type;
|
||||
public Integer quality;
|
||||
public Boolean omitBackground;
|
||||
public Integer timeout;
|
||||
|
||||
public ScreenshotOptions withPath(String path) {
|
||||
this.path = path;
|
||||
@@ -266,7 +266,7 @@ public interface ElementHandle {
|
||||
}
|
||||
}
|
||||
class ScrollIntoViewIfNeededOptions {
|
||||
Integer timeout;
|
||||
public Integer timeout;
|
||||
|
||||
public ScrollIntoViewIfNeededOptions withTimeout(Integer timeout) {
|
||||
this.timeout = timeout;
|
||||
@@ -274,8 +274,8 @@ public interface ElementHandle {
|
||||
}
|
||||
}
|
||||
class SelectOptionOptions {
|
||||
Boolean noWaitAfter;
|
||||
Integer timeout;
|
||||
public Boolean noWaitAfter;
|
||||
public Integer timeout;
|
||||
|
||||
public SelectOptionOptions withNoWaitAfter(Boolean noWaitAfter) {
|
||||
this.noWaitAfter = noWaitAfter;
|
||||
@@ -287,7 +287,7 @@ public interface ElementHandle {
|
||||
}
|
||||
}
|
||||
class SelectTextOptions {
|
||||
Integer timeout;
|
||||
public Integer timeout;
|
||||
|
||||
public SelectTextOptions withTimeout(Integer timeout) {
|
||||
this.timeout = timeout;
|
||||
@@ -295,8 +295,8 @@ public interface ElementHandle {
|
||||
}
|
||||
}
|
||||
class SetInputFilesOptions {
|
||||
Boolean noWaitAfter;
|
||||
Integer timeout;
|
||||
public Boolean noWaitAfter;
|
||||
public Integer timeout;
|
||||
|
||||
public SetInputFilesOptions withNoWaitAfter(Boolean noWaitAfter) {
|
||||
this.noWaitAfter = noWaitAfter;
|
||||
@@ -308,9 +308,9 @@ public interface ElementHandle {
|
||||
}
|
||||
}
|
||||
class TypeOptions {
|
||||
Integer delay;
|
||||
Boolean noWaitAfter;
|
||||
Integer timeout;
|
||||
public Integer delay;
|
||||
public Boolean noWaitAfter;
|
||||
public Integer timeout;
|
||||
|
||||
public TypeOptions withDelay(Integer delay) {
|
||||
this.delay = delay;
|
||||
@@ -326,9 +326,9 @@ public interface ElementHandle {
|
||||
}
|
||||
}
|
||||
class UncheckOptions {
|
||||
Boolean force;
|
||||
Boolean noWaitAfter;
|
||||
Integer timeout;
|
||||
public Boolean force;
|
||||
public Boolean noWaitAfter;
|
||||
public Integer timeout;
|
||||
|
||||
public UncheckOptions withForce(Boolean force) {
|
||||
this.force = force;
|
||||
@@ -344,7 +344,7 @@ public interface ElementHandle {
|
||||
}
|
||||
}
|
||||
class WaitForElementStateOptions {
|
||||
Integer timeout;
|
||||
public Integer timeout;
|
||||
|
||||
public WaitForElementStateOptions withTimeout(Integer timeout) {
|
||||
this.timeout = timeout;
|
||||
@@ -352,9 +352,9 @@ public interface ElementHandle {
|
||||
}
|
||||
}
|
||||
class WaitForSelectorOptions {
|
||||
enum State { ATTACHED, DETACHED, HIDDEN, VISIBLE}
|
||||
State state;
|
||||
Integer timeout;
|
||||
public enum State { ATTACHED, DETACHED, HIDDEN, VISIBLE}
|
||||
public State state;
|
||||
public Integer timeout;
|
||||
|
||||
public WaitForSelectorOptions withState(State state) {
|
||||
this.state = state;
|
||||
|
||||
@@ -21,8 +21,8 @@ import java.util.function.BiConsumer;
|
||||
|
||||
public interface FileChooser {
|
||||
class SetFilesOptions {
|
||||
Boolean noWaitAfter;
|
||||
Integer timeout;
|
||||
public Boolean noWaitAfter;
|
||||
public Integer timeout;
|
||||
|
||||
public SetFilesOptions withNoWaitAfter(Boolean noWaitAfter) {
|
||||
this.noWaitAfter = noWaitAfter;
|
||||
|
||||
@@ -21,10 +21,10 @@ import java.util.function.BiConsumer;
|
||||
|
||||
public interface FirefoxBrowser {
|
||||
class NewContextOptions {
|
||||
enum ColorScheme { DARK, LIGHT, NO_PREFERENCE}
|
||||
public enum ColorScheme { DARK, LIGHT, NO_PREFERENCE}
|
||||
public class Viewport {
|
||||
int width;
|
||||
int height;
|
||||
public int width;
|
||||
public int height;
|
||||
|
||||
Viewport() {
|
||||
}
|
||||
@@ -42,9 +42,9 @@ public interface FirefoxBrowser {
|
||||
}
|
||||
}
|
||||
public class Geolocation {
|
||||
double latitude;
|
||||
double longitude;
|
||||
double accuracy;
|
||||
public double latitude;
|
||||
public double longitude;
|
||||
public double accuracy;
|
||||
|
||||
Geolocation() {
|
||||
}
|
||||
@@ -66,8 +66,8 @@ public interface FirefoxBrowser {
|
||||
}
|
||||
}
|
||||
public class HttpCredentials {
|
||||
String username;
|
||||
String password;
|
||||
public String username;
|
||||
public String password;
|
||||
|
||||
HttpCredentials() {
|
||||
}
|
||||
@@ -85,8 +85,8 @@ public interface FirefoxBrowser {
|
||||
}
|
||||
}
|
||||
public class VideoSize {
|
||||
int width;
|
||||
int height;
|
||||
public int width;
|
||||
public int height;
|
||||
|
||||
VideoSize() {
|
||||
}
|
||||
@@ -103,28 +103,28 @@ public interface FirefoxBrowser {
|
||||
return this;
|
||||
}
|
||||
}
|
||||
Boolean acceptDownloads;
|
||||
Boolean ignoreHTTPSErrors;
|
||||
Boolean bypassCSP;
|
||||
Viewport viewport;
|
||||
String userAgent;
|
||||
Integer deviceScaleFactor;
|
||||
Boolean isMobile;
|
||||
Boolean hasTouch;
|
||||
Boolean javaScriptEnabled;
|
||||
String timezoneId;
|
||||
Geolocation geolocation;
|
||||
String locale;
|
||||
List<String> permissions;
|
||||
Map<String, String> extraHTTPHeaders;
|
||||
Boolean offline;
|
||||
HttpCredentials httpCredentials;
|
||||
ColorScheme colorScheme;
|
||||
Logger logger;
|
||||
String relativeArtifactsPath;
|
||||
Boolean recordVideos;
|
||||
VideoSize videoSize;
|
||||
Boolean recordTrace;
|
||||
public Boolean acceptDownloads;
|
||||
public Boolean ignoreHTTPSErrors;
|
||||
public Boolean bypassCSP;
|
||||
public Viewport viewport;
|
||||
public String userAgent;
|
||||
public Integer deviceScaleFactor;
|
||||
public Boolean isMobile;
|
||||
public Boolean hasTouch;
|
||||
public Boolean javaScriptEnabled;
|
||||
public String timezoneId;
|
||||
public Geolocation geolocation;
|
||||
public String locale;
|
||||
public List<String> permissions;
|
||||
public Map<String, String> extraHTTPHeaders;
|
||||
public Boolean offline;
|
||||
public HttpCredentials httpCredentials;
|
||||
public ColorScheme colorScheme;
|
||||
public Logger logger;
|
||||
public String relativeArtifactsPath;
|
||||
public Boolean recordVideos;
|
||||
public VideoSize videoSize;
|
||||
public Boolean recordTrace;
|
||||
|
||||
public NewContextOptions withAcceptDownloads(Boolean acceptDownloads) {
|
||||
this.acceptDownloads = acceptDownloads;
|
||||
@@ -216,10 +216,10 @@ public interface FirefoxBrowser {
|
||||
}
|
||||
}
|
||||
class NewPageOptions {
|
||||
enum ColorScheme { DARK, LIGHT, NO_PREFERENCE}
|
||||
public enum ColorScheme { DARK, LIGHT, NO_PREFERENCE}
|
||||
public class Viewport {
|
||||
int width;
|
||||
int height;
|
||||
public int width;
|
||||
public int height;
|
||||
|
||||
Viewport() {
|
||||
}
|
||||
@@ -237,9 +237,9 @@ public interface FirefoxBrowser {
|
||||
}
|
||||
}
|
||||
public class Geolocation {
|
||||
double latitude;
|
||||
double longitude;
|
||||
double accuracy;
|
||||
public double latitude;
|
||||
public double longitude;
|
||||
public double accuracy;
|
||||
|
||||
Geolocation() {
|
||||
}
|
||||
@@ -261,8 +261,8 @@ public interface FirefoxBrowser {
|
||||
}
|
||||
}
|
||||
public class HttpCredentials {
|
||||
String username;
|
||||
String password;
|
||||
public String username;
|
||||
public String password;
|
||||
|
||||
HttpCredentials() {
|
||||
}
|
||||
@@ -280,8 +280,8 @@ public interface FirefoxBrowser {
|
||||
}
|
||||
}
|
||||
public class VideoSize {
|
||||
int width;
|
||||
int height;
|
||||
public int width;
|
||||
public int height;
|
||||
|
||||
VideoSize() {
|
||||
}
|
||||
@@ -298,28 +298,28 @@ public interface FirefoxBrowser {
|
||||
return this;
|
||||
}
|
||||
}
|
||||
Boolean acceptDownloads;
|
||||
Boolean ignoreHTTPSErrors;
|
||||
Boolean bypassCSP;
|
||||
Viewport viewport;
|
||||
String userAgent;
|
||||
Integer deviceScaleFactor;
|
||||
Boolean isMobile;
|
||||
Boolean hasTouch;
|
||||
Boolean javaScriptEnabled;
|
||||
String timezoneId;
|
||||
Geolocation geolocation;
|
||||
String locale;
|
||||
List<String> permissions;
|
||||
Map<String, String> extraHTTPHeaders;
|
||||
Boolean offline;
|
||||
HttpCredentials httpCredentials;
|
||||
ColorScheme colorScheme;
|
||||
Logger logger;
|
||||
String relativeArtifactsPath;
|
||||
Boolean recordVideos;
|
||||
VideoSize videoSize;
|
||||
Boolean recordTrace;
|
||||
public Boolean acceptDownloads;
|
||||
public Boolean ignoreHTTPSErrors;
|
||||
public Boolean bypassCSP;
|
||||
public Viewport viewport;
|
||||
public String userAgent;
|
||||
public Integer deviceScaleFactor;
|
||||
public Boolean isMobile;
|
||||
public Boolean hasTouch;
|
||||
public Boolean javaScriptEnabled;
|
||||
public String timezoneId;
|
||||
public Geolocation geolocation;
|
||||
public String locale;
|
||||
public List<String> permissions;
|
||||
public Map<String, String> extraHTTPHeaders;
|
||||
public Boolean offline;
|
||||
public HttpCredentials httpCredentials;
|
||||
public ColorScheme colorScheme;
|
||||
public Logger logger;
|
||||
public String relativeArtifactsPath;
|
||||
public Boolean recordVideos;
|
||||
public VideoSize videoSize;
|
||||
public Boolean recordTrace;
|
||||
|
||||
public NewPageOptions withAcceptDownloads(Boolean acceptDownloads) {
|
||||
this.acceptDownloads = acceptDownloads;
|
||||
|
||||
@@ -22,10 +22,10 @@ import java.util.function.BiConsumer;
|
||||
public interface Frame {
|
||||
enum LoadState { DOMCONTENTLOADED, LOAD, NETWORKIDLE}
|
||||
class AddScriptTagOptions {
|
||||
String url;
|
||||
String path;
|
||||
String content;
|
||||
String type;
|
||||
public String url;
|
||||
public String path;
|
||||
public String content;
|
||||
public String type;
|
||||
|
||||
public AddScriptTagOptions withUrl(String url) {
|
||||
this.url = url;
|
||||
@@ -45,9 +45,9 @@ public interface Frame {
|
||||
}
|
||||
}
|
||||
class AddStyleTagOptions {
|
||||
String url;
|
||||
String path;
|
||||
String content;
|
||||
public String url;
|
||||
public String path;
|
||||
public String content;
|
||||
|
||||
public AddStyleTagOptions withUrl(String url) {
|
||||
this.url = url;
|
||||
@@ -63,9 +63,9 @@ public interface Frame {
|
||||
}
|
||||
}
|
||||
class CheckOptions {
|
||||
Boolean force;
|
||||
Boolean noWaitAfter;
|
||||
Integer timeout;
|
||||
public Boolean force;
|
||||
public Boolean noWaitAfter;
|
||||
public Integer timeout;
|
||||
|
||||
public CheckOptions withForce(Boolean force) {
|
||||
this.force = force;
|
||||
@@ -81,11 +81,11 @@ public interface Frame {
|
||||
}
|
||||
}
|
||||
class ClickOptions {
|
||||
enum Button { LEFT, MIDDLE, RIGHT}
|
||||
enum Modifier { ALT, CONTROL, META, SHIFT}
|
||||
public enum Button { LEFT, MIDDLE, RIGHT}
|
||||
public enum Modifier { ALT, CONTROL, META, SHIFT}
|
||||
public class Position {
|
||||
int x;
|
||||
int y;
|
||||
public int x;
|
||||
public int y;
|
||||
|
||||
Position() {
|
||||
}
|
||||
@@ -102,14 +102,14 @@ public interface Frame {
|
||||
return this;
|
||||
}
|
||||
}
|
||||
Button button;
|
||||
Integer clickCount;
|
||||
Integer delay;
|
||||
Position position;
|
||||
Set<Modifier> modifiers;
|
||||
Boolean force;
|
||||
Boolean noWaitAfter;
|
||||
Integer timeout;
|
||||
public Button button;
|
||||
public Integer clickCount;
|
||||
public Integer delay;
|
||||
public Position position;
|
||||
public Set<Modifier> modifiers;
|
||||
public Boolean force;
|
||||
public Boolean noWaitAfter;
|
||||
public Integer timeout;
|
||||
|
||||
public ClickOptions withButton(Button button) {
|
||||
this.button = button;
|
||||
@@ -145,11 +145,11 @@ public interface Frame {
|
||||
}
|
||||
}
|
||||
class DblclickOptions {
|
||||
enum Button { LEFT, MIDDLE, RIGHT}
|
||||
enum Modifier { ALT, CONTROL, META, SHIFT}
|
||||
public enum Button { LEFT, MIDDLE, RIGHT}
|
||||
public enum Modifier { ALT, CONTROL, META, SHIFT}
|
||||
public class Position {
|
||||
int x;
|
||||
int y;
|
||||
public int x;
|
||||
public int y;
|
||||
|
||||
Position() {
|
||||
}
|
||||
@@ -166,13 +166,13 @@ public interface Frame {
|
||||
return this;
|
||||
}
|
||||
}
|
||||
Button button;
|
||||
Integer delay;
|
||||
Position position;
|
||||
Set<Modifier> modifiers;
|
||||
Boolean force;
|
||||
Boolean noWaitAfter;
|
||||
Integer timeout;
|
||||
public Button button;
|
||||
public Integer delay;
|
||||
public Position position;
|
||||
public Set<Modifier> modifiers;
|
||||
public Boolean force;
|
||||
public Boolean noWaitAfter;
|
||||
public Integer timeout;
|
||||
|
||||
public DblclickOptions withButton(Button button) {
|
||||
this.button = button;
|
||||
@@ -204,7 +204,7 @@ public interface Frame {
|
||||
}
|
||||
}
|
||||
class DispatchEventOptions {
|
||||
Integer timeout;
|
||||
public Integer timeout;
|
||||
|
||||
public DispatchEventOptions withTimeout(Integer timeout) {
|
||||
this.timeout = timeout;
|
||||
@@ -212,8 +212,8 @@ public interface Frame {
|
||||
}
|
||||
}
|
||||
class FillOptions {
|
||||
Boolean noWaitAfter;
|
||||
Integer timeout;
|
||||
public Boolean noWaitAfter;
|
||||
public Integer timeout;
|
||||
|
||||
public FillOptions withNoWaitAfter(Boolean noWaitAfter) {
|
||||
this.noWaitAfter = noWaitAfter;
|
||||
@@ -225,7 +225,7 @@ public interface Frame {
|
||||
}
|
||||
}
|
||||
class FocusOptions {
|
||||
Integer timeout;
|
||||
public Integer timeout;
|
||||
|
||||
public FocusOptions withTimeout(Integer timeout) {
|
||||
this.timeout = timeout;
|
||||
@@ -233,7 +233,7 @@ public interface Frame {
|
||||
}
|
||||
}
|
||||
class GetAttributeOptions {
|
||||
Integer timeout;
|
||||
public Integer timeout;
|
||||
|
||||
public GetAttributeOptions withTimeout(Integer timeout) {
|
||||
this.timeout = timeout;
|
||||
@@ -241,10 +241,10 @@ public interface Frame {
|
||||
}
|
||||
}
|
||||
class NavigateOptions {
|
||||
enum WaitUntil { DOMCONTENTLOADED, LOAD, NETWORKIDLE}
|
||||
Integer timeout;
|
||||
WaitUntil waitUntil;
|
||||
String referer;
|
||||
public enum WaitUntil { DOMCONTENTLOADED, LOAD, NETWORKIDLE}
|
||||
public Integer timeout;
|
||||
public WaitUntil waitUntil;
|
||||
public String referer;
|
||||
|
||||
public NavigateOptions withTimeout(Integer timeout) {
|
||||
this.timeout = timeout;
|
||||
@@ -260,10 +260,10 @@ public interface Frame {
|
||||
}
|
||||
}
|
||||
class HoverOptions {
|
||||
enum Modifier { ALT, CONTROL, META, SHIFT}
|
||||
public enum Modifier { ALT, CONTROL, META, SHIFT}
|
||||
public class Position {
|
||||
int x;
|
||||
int y;
|
||||
public int x;
|
||||
public int y;
|
||||
|
||||
Position() {
|
||||
}
|
||||
@@ -280,10 +280,10 @@ public interface Frame {
|
||||
return this;
|
||||
}
|
||||
}
|
||||
Position position;
|
||||
Set<Modifier> modifiers;
|
||||
Boolean force;
|
||||
Integer timeout;
|
||||
public Position position;
|
||||
public Set<Modifier> modifiers;
|
||||
public Boolean force;
|
||||
public Integer timeout;
|
||||
|
||||
public Position setPosition() {
|
||||
this.position = new Position();
|
||||
@@ -303,7 +303,7 @@ public interface Frame {
|
||||
}
|
||||
}
|
||||
class InnerHTMLOptions {
|
||||
Integer timeout;
|
||||
public Integer timeout;
|
||||
|
||||
public InnerHTMLOptions withTimeout(Integer timeout) {
|
||||
this.timeout = timeout;
|
||||
@@ -311,7 +311,7 @@ public interface Frame {
|
||||
}
|
||||
}
|
||||
class InnerTextOptions {
|
||||
Integer timeout;
|
||||
public Integer timeout;
|
||||
|
||||
public InnerTextOptions withTimeout(Integer timeout) {
|
||||
this.timeout = timeout;
|
||||
@@ -319,9 +319,9 @@ public interface Frame {
|
||||
}
|
||||
}
|
||||
class PressOptions {
|
||||
Integer delay;
|
||||
Boolean noWaitAfter;
|
||||
Integer timeout;
|
||||
public Integer delay;
|
||||
public Boolean noWaitAfter;
|
||||
public Integer timeout;
|
||||
|
||||
public PressOptions withDelay(Integer delay) {
|
||||
this.delay = delay;
|
||||
@@ -337,8 +337,8 @@ public interface Frame {
|
||||
}
|
||||
}
|
||||
class SelectOptionOptions {
|
||||
Boolean noWaitAfter;
|
||||
Integer timeout;
|
||||
public Boolean noWaitAfter;
|
||||
public Integer timeout;
|
||||
|
||||
public SelectOptionOptions withNoWaitAfter(Boolean noWaitAfter) {
|
||||
this.noWaitAfter = noWaitAfter;
|
||||
@@ -350,9 +350,9 @@ public interface Frame {
|
||||
}
|
||||
}
|
||||
class SetContentOptions {
|
||||
enum WaitUntil { DOMCONTENTLOADED, LOAD, NETWORKIDLE}
|
||||
Integer timeout;
|
||||
WaitUntil waitUntil;
|
||||
public enum WaitUntil { DOMCONTENTLOADED, LOAD, NETWORKIDLE}
|
||||
public Integer timeout;
|
||||
public WaitUntil waitUntil;
|
||||
|
||||
public SetContentOptions withTimeout(Integer timeout) {
|
||||
this.timeout = timeout;
|
||||
@@ -364,8 +364,8 @@ public interface Frame {
|
||||
}
|
||||
}
|
||||
class SetInputFilesOptions {
|
||||
Boolean noWaitAfter;
|
||||
Integer timeout;
|
||||
public Boolean noWaitAfter;
|
||||
public Integer timeout;
|
||||
|
||||
public SetInputFilesOptions withNoWaitAfter(Boolean noWaitAfter) {
|
||||
this.noWaitAfter = noWaitAfter;
|
||||
@@ -377,7 +377,7 @@ public interface Frame {
|
||||
}
|
||||
}
|
||||
class TextContentOptions {
|
||||
Integer timeout;
|
||||
public Integer timeout;
|
||||
|
||||
public TextContentOptions withTimeout(Integer timeout) {
|
||||
this.timeout = timeout;
|
||||
@@ -385,9 +385,9 @@ public interface Frame {
|
||||
}
|
||||
}
|
||||
class TypeOptions {
|
||||
Integer delay;
|
||||
Boolean noWaitAfter;
|
||||
Integer timeout;
|
||||
public Integer delay;
|
||||
public Boolean noWaitAfter;
|
||||
public Integer timeout;
|
||||
|
||||
public TypeOptions withDelay(Integer delay) {
|
||||
this.delay = delay;
|
||||
@@ -403,9 +403,9 @@ public interface Frame {
|
||||
}
|
||||
}
|
||||
class UncheckOptions {
|
||||
Boolean force;
|
||||
Boolean noWaitAfter;
|
||||
Integer timeout;
|
||||
public Boolean force;
|
||||
public Boolean noWaitAfter;
|
||||
public Integer timeout;
|
||||
|
||||
public UncheckOptions withForce(Boolean force) {
|
||||
this.force = force;
|
||||
@@ -421,8 +421,8 @@ public interface Frame {
|
||||
}
|
||||
}
|
||||
class WaitForFunctionOptions {
|
||||
double polling;
|
||||
Integer timeout;
|
||||
public double polling;
|
||||
public Integer timeout;
|
||||
|
||||
public WaitForFunctionOptions withPolling(double polling) {
|
||||
this.polling = polling;
|
||||
@@ -434,7 +434,7 @@ public interface Frame {
|
||||
}
|
||||
}
|
||||
class WaitForLoadStateOptions {
|
||||
Integer timeout;
|
||||
public Integer timeout;
|
||||
|
||||
public WaitForLoadStateOptions withTimeout(Integer timeout) {
|
||||
this.timeout = timeout;
|
||||
@@ -442,10 +442,10 @@ public interface Frame {
|
||||
}
|
||||
}
|
||||
class WaitForNavigationOptions {
|
||||
enum WaitUntil { DOMCONTENTLOADED, LOAD, NETWORKIDLE}
|
||||
Integer timeout;
|
||||
String url;
|
||||
WaitUntil waitUntil;
|
||||
public enum WaitUntil { DOMCONTENTLOADED, LOAD, NETWORKIDLE}
|
||||
public Integer timeout;
|
||||
public String url;
|
||||
public WaitUntil waitUntil;
|
||||
|
||||
public WaitForNavigationOptions withTimeout(Integer timeout) {
|
||||
this.timeout = timeout;
|
||||
@@ -461,9 +461,9 @@ public interface Frame {
|
||||
}
|
||||
}
|
||||
class WaitForSelectorOptions {
|
||||
enum State { ATTACHED, DETACHED, HIDDEN, VISIBLE}
|
||||
State state;
|
||||
Integer timeout;
|
||||
public enum State { ATTACHED, DETACHED, HIDDEN, VISIBLE}
|
||||
public State state;
|
||||
public Integer timeout;
|
||||
|
||||
public WaitForSelectorOptions withState(State state) {
|
||||
this.state = state;
|
||||
|
||||
@@ -21,7 +21,7 @@ import java.util.function.BiConsumer;
|
||||
|
||||
public interface Keyboard {
|
||||
class PressOptions {
|
||||
Integer delay;
|
||||
public Integer delay;
|
||||
|
||||
public PressOptions withDelay(Integer delay) {
|
||||
this.delay = delay;
|
||||
@@ -29,7 +29,7 @@ public interface Keyboard {
|
||||
}
|
||||
}
|
||||
class TypeOptions {
|
||||
Integer delay;
|
||||
public Integer delay;
|
||||
|
||||
public TypeOptions withDelay(Integer delay) {
|
||||
this.delay = delay;
|
||||
|
||||
@@ -22,7 +22,7 @@ import java.util.function.BiConsumer;
|
||||
public interface Logger {
|
||||
enum Severity { ERROR, INFO, VERBOSE, WARNING}
|
||||
class LogHints {
|
||||
String color;
|
||||
public String color;
|
||||
|
||||
public LogHints withColor(String color) {
|
||||
this.color = color;
|
||||
|
||||
@@ -21,10 +21,10 @@ import java.util.function.BiConsumer;
|
||||
|
||||
public interface Mouse {
|
||||
class ClickOptions {
|
||||
enum Button { LEFT, MIDDLE, RIGHT}
|
||||
Button button;
|
||||
Integer clickCount;
|
||||
Integer delay;
|
||||
public enum Button { LEFT, MIDDLE, RIGHT}
|
||||
public Button button;
|
||||
public Integer clickCount;
|
||||
public Integer delay;
|
||||
|
||||
public ClickOptions withButton(Button button) {
|
||||
this.button = button;
|
||||
@@ -40,9 +40,9 @@ public interface Mouse {
|
||||
}
|
||||
}
|
||||
class DblclickOptions {
|
||||
enum Button { LEFT, MIDDLE, RIGHT}
|
||||
Button button;
|
||||
Integer delay;
|
||||
public enum Button { LEFT, MIDDLE, RIGHT}
|
||||
public Button button;
|
||||
public Integer delay;
|
||||
|
||||
public DblclickOptions withButton(Button button) {
|
||||
this.button = button;
|
||||
@@ -54,9 +54,9 @@ public interface Mouse {
|
||||
}
|
||||
}
|
||||
class DownOptions {
|
||||
enum Button { LEFT, MIDDLE, RIGHT}
|
||||
Button button;
|
||||
Integer clickCount;
|
||||
public enum Button { LEFT, MIDDLE, RIGHT}
|
||||
public Button button;
|
||||
public Integer clickCount;
|
||||
|
||||
public DownOptions withButton(Button button) {
|
||||
this.button = button;
|
||||
@@ -68,7 +68,7 @@ public interface Mouse {
|
||||
}
|
||||
}
|
||||
class MoveOptions {
|
||||
Integer steps;
|
||||
public Integer steps;
|
||||
|
||||
public MoveOptions withSteps(Integer steps) {
|
||||
this.steps = steps;
|
||||
@@ -76,9 +76,9 @@ public interface Mouse {
|
||||
}
|
||||
}
|
||||
class UpOptions {
|
||||
enum Button { LEFT, MIDDLE, RIGHT}
|
||||
Button button;
|
||||
Integer clickCount;
|
||||
public enum Button { LEFT, MIDDLE, RIGHT}
|
||||
public Button button;
|
||||
public Integer clickCount;
|
||||
|
||||
public UpOptions withButton(Button button) {
|
||||
this.button = button;
|
||||
|
||||
@@ -22,7 +22,7 @@ import java.util.function.BiConsumer;
|
||||
public interface Page {
|
||||
enum LoadState { DOMCONTENTLOADED, LOAD, NETWORKIDLE}
|
||||
class CloseOptions {
|
||||
Boolean runBeforeUnload;
|
||||
public Boolean runBeforeUnload;
|
||||
|
||||
public CloseOptions withRunBeforeUnload(Boolean runBeforeUnload) {
|
||||
this.runBeforeUnload = runBeforeUnload;
|
||||
@@ -30,10 +30,10 @@ public interface Page {
|
||||
}
|
||||
}
|
||||
class AddScriptTagOptions {
|
||||
String url;
|
||||
String path;
|
||||
String content;
|
||||
String type;
|
||||
public String url;
|
||||
public String path;
|
||||
public String content;
|
||||
public String type;
|
||||
|
||||
public AddScriptTagOptions withUrl(String url) {
|
||||
this.url = url;
|
||||
@@ -53,9 +53,9 @@ public interface Page {
|
||||
}
|
||||
}
|
||||
class AddStyleTagOptions {
|
||||
String url;
|
||||
String path;
|
||||
String content;
|
||||
public String url;
|
||||
public String path;
|
||||
public String content;
|
||||
|
||||
public AddStyleTagOptions withUrl(String url) {
|
||||
this.url = url;
|
||||
@@ -71,9 +71,9 @@ public interface Page {
|
||||
}
|
||||
}
|
||||
class CheckOptions {
|
||||
Boolean force;
|
||||
Boolean noWaitAfter;
|
||||
Integer timeout;
|
||||
public Boolean force;
|
||||
public Boolean noWaitAfter;
|
||||
public Integer timeout;
|
||||
|
||||
public CheckOptions withForce(Boolean force) {
|
||||
this.force = force;
|
||||
@@ -89,11 +89,11 @@ public interface Page {
|
||||
}
|
||||
}
|
||||
class ClickOptions {
|
||||
enum Button { LEFT, MIDDLE, RIGHT}
|
||||
enum Modifier { ALT, CONTROL, META, SHIFT}
|
||||
public enum Button { LEFT, MIDDLE, RIGHT}
|
||||
public enum Modifier { ALT, CONTROL, META, SHIFT}
|
||||
public class Position {
|
||||
int x;
|
||||
int y;
|
||||
public int x;
|
||||
public int y;
|
||||
|
||||
Position() {
|
||||
}
|
||||
@@ -110,14 +110,14 @@ public interface Page {
|
||||
return this;
|
||||
}
|
||||
}
|
||||
Button button;
|
||||
Integer clickCount;
|
||||
Integer delay;
|
||||
Position position;
|
||||
Set<Modifier> modifiers;
|
||||
Boolean force;
|
||||
Boolean noWaitAfter;
|
||||
Integer timeout;
|
||||
public Button button;
|
||||
public Integer clickCount;
|
||||
public Integer delay;
|
||||
public Position position;
|
||||
public Set<Modifier> modifiers;
|
||||
public Boolean force;
|
||||
public Boolean noWaitAfter;
|
||||
public Integer timeout;
|
||||
|
||||
public ClickOptions withButton(Button button) {
|
||||
this.button = button;
|
||||
@@ -153,11 +153,11 @@ public interface Page {
|
||||
}
|
||||
}
|
||||
class DblclickOptions {
|
||||
enum Button { LEFT, MIDDLE, RIGHT}
|
||||
enum Modifier { ALT, CONTROL, META, SHIFT}
|
||||
public enum Button { LEFT, MIDDLE, RIGHT}
|
||||
public enum Modifier { ALT, CONTROL, META, SHIFT}
|
||||
public class Position {
|
||||
int x;
|
||||
int y;
|
||||
public int x;
|
||||
public int y;
|
||||
|
||||
Position() {
|
||||
}
|
||||
@@ -174,13 +174,13 @@ public interface Page {
|
||||
return this;
|
||||
}
|
||||
}
|
||||
Button button;
|
||||
Integer delay;
|
||||
Position position;
|
||||
Set<Modifier> modifiers;
|
||||
Boolean force;
|
||||
Boolean noWaitAfter;
|
||||
Integer timeout;
|
||||
public Button button;
|
||||
public Integer delay;
|
||||
public Position position;
|
||||
public Set<Modifier> modifiers;
|
||||
public Boolean force;
|
||||
public Boolean noWaitAfter;
|
||||
public Integer timeout;
|
||||
|
||||
public DblclickOptions withButton(Button button) {
|
||||
this.button = button;
|
||||
@@ -212,7 +212,7 @@ public interface Page {
|
||||
}
|
||||
}
|
||||
class DispatchEventOptions {
|
||||
Integer timeout;
|
||||
public Integer timeout;
|
||||
|
||||
public DispatchEventOptions withTimeout(Integer timeout) {
|
||||
this.timeout = timeout;
|
||||
@@ -220,10 +220,10 @@ public interface Page {
|
||||
}
|
||||
}
|
||||
class EmulateMediaOptions {
|
||||
enum Media { PRINT, SCREEN}
|
||||
enum ColorScheme { DARK, LIGHT, NO_PREFERENCE}
|
||||
Media media;
|
||||
ColorScheme colorScheme;
|
||||
public enum Media { PRINT, SCREEN}
|
||||
public enum ColorScheme { DARK, LIGHT, NO_PREFERENCE}
|
||||
public Media media;
|
||||
public ColorScheme colorScheme;
|
||||
|
||||
public EmulateMediaOptions withMedia(Media media) {
|
||||
this.media = media;
|
||||
@@ -235,8 +235,8 @@ public interface Page {
|
||||
}
|
||||
}
|
||||
class FillOptions {
|
||||
Boolean noWaitAfter;
|
||||
Integer timeout;
|
||||
public Boolean noWaitAfter;
|
||||
public Integer timeout;
|
||||
|
||||
public FillOptions withNoWaitAfter(Boolean noWaitAfter) {
|
||||
this.noWaitAfter = noWaitAfter;
|
||||
@@ -248,7 +248,7 @@ public interface Page {
|
||||
}
|
||||
}
|
||||
class FocusOptions {
|
||||
Integer timeout;
|
||||
public Integer timeout;
|
||||
|
||||
public FocusOptions withTimeout(Integer timeout) {
|
||||
this.timeout = timeout;
|
||||
@@ -256,7 +256,7 @@ public interface Page {
|
||||
}
|
||||
}
|
||||
class GetAttributeOptions {
|
||||
Integer timeout;
|
||||
public Integer timeout;
|
||||
|
||||
public GetAttributeOptions withTimeout(Integer timeout) {
|
||||
this.timeout = timeout;
|
||||
@@ -264,9 +264,9 @@ public interface Page {
|
||||
}
|
||||
}
|
||||
class GoBackOptions {
|
||||
enum WaitUntil { DOMCONTENTLOADED, LOAD, NETWORKIDLE}
|
||||
Integer timeout;
|
||||
WaitUntil waitUntil;
|
||||
public enum WaitUntil { DOMCONTENTLOADED, LOAD, NETWORKIDLE}
|
||||
public Integer timeout;
|
||||
public WaitUntil waitUntil;
|
||||
|
||||
public GoBackOptions withTimeout(Integer timeout) {
|
||||
this.timeout = timeout;
|
||||
@@ -278,9 +278,9 @@ public interface Page {
|
||||
}
|
||||
}
|
||||
class GoForwardOptions {
|
||||
enum WaitUntil { DOMCONTENTLOADED, LOAD, NETWORKIDLE}
|
||||
Integer timeout;
|
||||
WaitUntil waitUntil;
|
||||
public enum WaitUntil { DOMCONTENTLOADED, LOAD, NETWORKIDLE}
|
||||
public Integer timeout;
|
||||
public WaitUntil waitUntil;
|
||||
|
||||
public GoForwardOptions withTimeout(Integer timeout) {
|
||||
this.timeout = timeout;
|
||||
@@ -292,10 +292,10 @@ public interface Page {
|
||||
}
|
||||
}
|
||||
class NavigateOptions {
|
||||
enum WaitUntil { DOMCONTENTLOADED, LOAD, NETWORKIDLE}
|
||||
Integer timeout;
|
||||
WaitUntil waitUntil;
|
||||
String referer;
|
||||
public enum WaitUntil { DOMCONTENTLOADED, LOAD, NETWORKIDLE}
|
||||
public Integer timeout;
|
||||
public WaitUntil waitUntil;
|
||||
public String referer;
|
||||
|
||||
public NavigateOptions withTimeout(Integer timeout) {
|
||||
this.timeout = timeout;
|
||||
@@ -311,10 +311,10 @@ public interface Page {
|
||||
}
|
||||
}
|
||||
class HoverOptions {
|
||||
enum Modifier { ALT, CONTROL, META, SHIFT}
|
||||
public enum Modifier { ALT, CONTROL, META, SHIFT}
|
||||
public class Position {
|
||||
int x;
|
||||
int y;
|
||||
public int x;
|
||||
public int y;
|
||||
|
||||
Position() {
|
||||
}
|
||||
@@ -331,10 +331,10 @@ public interface Page {
|
||||
return this;
|
||||
}
|
||||
}
|
||||
Position position;
|
||||
Set<Modifier> modifiers;
|
||||
Boolean force;
|
||||
Integer timeout;
|
||||
public Position position;
|
||||
public Set<Modifier> modifiers;
|
||||
public Boolean force;
|
||||
public Integer timeout;
|
||||
|
||||
public Position setPosition() {
|
||||
this.position = new Position();
|
||||
@@ -354,7 +354,7 @@ public interface Page {
|
||||
}
|
||||
}
|
||||
class InnerHTMLOptions {
|
||||
Integer timeout;
|
||||
public Integer timeout;
|
||||
|
||||
public InnerHTMLOptions withTimeout(Integer timeout) {
|
||||
this.timeout = timeout;
|
||||
@@ -362,7 +362,7 @@ public interface Page {
|
||||
}
|
||||
}
|
||||
class InnerTextOptions {
|
||||
Integer timeout;
|
||||
public Integer timeout;
|
||||
|
||||
public InnerTextOptions withTimeout(Integer timeout) {
|
||||
this.timeout = timeout;
|
||||
@@ -371,10 +371,10 @@ public interface Page {
|
||||
}
|
||||
class PdfOptions {
|
||||
public class Margin {
|
||||
String top;
|
||||
String right;
|
||||
String bottom;
|
||||
String left;
|
||||
public String top;
|
||||
public String right;
|
||||
public String bottom;
|
||||
public String left;
|
||||
|
||||
Margin() {
|
||||
}
|
||||
@@ -399,19 +399,19 @@ public interface Page {
|
||||
return this;
|
||||
}
|
||||
}
|
||||
String path;
|
||||
Integer scale;
|
||||
Boolean displayHeaderFooter;
|
||||
String headerTemplate;
|
||||
String footerTemplate;
|
||||
Boolean printBackground;
|
||||
Boolean landscape;
|
||||
String pageRanges;
|
||||
String format;
|
||||
String width;
|
||||
String height;
|
||||
Margin margin;
|
||||
Boolean preferCSSPageSize;
|
||||
public String path;
|
||||
public Integer scale;
|
||||
public Boolean displayHeaderFooter;
|
||||
public String headerTemplate;
|
||||
public String footerTemplate;
|
||||
public Boolean printBackground;
|
||||
public Boolean landscape;
|
||||
public String pageRanges;
|
||||
public String format;
|
||||
public String width;
|
||||
public String height;
|
||||
public Margin margin;
|
||||
public Boolean preferCSSPageSize;
|
||||
|
||||
public PdfOptions withPath(String path) {
|
||||
this.path = path;
|
||||
@@ -467,9 +467,9 @@ public interface Page {
|
||||
}
|
||||
}
|
||||
class PressOptions {
|
||||
Integer delay;
|
||||
Boolean noWaitAfter;
|
||||
Integer timeout;
|
||||
public Integer delay;
|
||||
public Boolean noWaitAfter;
|
||||
public Integer timeout;
|
||||
|
||||
public PressOptions withDelay(Integer delay) {
|
||||
this.delay = delay;
|
||||
@@ -485,9 +485,9 @@ public interface Page {
|
||||
}
|
||||
}
|
||||
class ReloadOptions {
|
||||
enum WaitUntil { DOMCONTENTLOADED, LOAD, NETWORKIDLE}
|
||||
Integer timeout;
|
||||
WaitUntil waitUntil;
|
||||
public enum WaitUntil { DOMCONTENTLOADED, LOAD, NETWORKIDLE}
|
||||
public Integer timeout;
|
||||
public WaitUntil waitUntil;
|
||||
|
||||
public ReloadOptions withTimeout(Integer timeout) {
|
||||
this.timeout = timeout;
|
||||
@@ -499,12 +499,12 @@ public interface Page {
|
||||
}
|
||||
}
|
||||
class ScreenshotOptions {
|
||||
enum Type { JPEG, PNG}
|
||||
public enum Type { JPEG, PNG}
|
||||
public class Clip {
|
||||
int x;
|
||||
int y;
|
||||
int width;
|
||||
int height;
|
||||
public int x;
|
||||
public int y;
|
||||
public int width;
|
||||
public int height;
|
||||
|
||||
Clip() {
|
||||
}
|
||||
@@ -529,13 +529,13 @@ public interface Page {
|
||||
return this;
|
||||
}
|
||||
}
|
||||
String path;
|
||||
Type type;
|
||||
Integer quality;
|
||||
Boolean fullPage;
|
||||
Clip clip;
|
||||
Boolean omitBackground;
|
||||
Integer timeout;
|
||||
public String path;
|
||||
public Type type;
|
||||
public Integer quality;
|
||||
public Boolean fullPage;
|
||||
public Clip clip;
|
||||
public Boolean omitBackground;
|
||||
public Integer timeout;
|
||||
|
||||
public ScreenshotOptions withPath(String path) {
|
||||
this.path = path;
|
||||
@@ -567,8 +567,8 @@ public interface Page {
|
||||
}
|
||||
}
|
||||
class SelectOptionOptions {
|
||||
Boolean noWaitAfter;
|
||||
Integer timeout;
|
||||
public Boolean noWaitAfter;
|
||||
public Integer timeout;
|
||||
|
||||
public SelectOptionOptions withNoWaitAfter(Boolean noWaitAfter) {
|
||||
this.noWaitAfter = noWaitAfter;
|
||||
@@ -580,9 +580,9 @@ public interface Page {
|
||||
}
|
||||
}
|
||||
class SetContentOptions {
|
||||
enum WaitUntil { DOMCONTENTLOADED, LOAD, NETWORKIDLE}
|
||||
Integer timeout;
|
||||
WaitUntil waitUntil;
|
||||
public enum WaitUntil { DOMCONTENTLOADED, LOAD, NETWORKIDLE}
|
||||
public Integer timeout;
|
||||
public WaitUntil waitUntil;
|
||||
|
||||
public SetContentOptions withTimeout(Integer timeout) {
|
||||
this.timeout = timeout;
|
||||
@@ -594,8 +594,8 @@ public interface Page {
|
||||
}
|
||||
}
|
||||
class SetInputFilesOptions {
|
||||
Boolean noWaitAfter;
|
||||
Integer timeout;
|
||||
public Boolean noWaitAfter;
|
||||
public Integer timeout;
|
||||
|
||||
public SetInputFilesOptions withNoWaitAfter(Boolean noWaitAfter) {
|
||||
this.noWaitAfter = noWaitAfter;
|
||||
@@ -607,8 +607,8 @@ public interface Page {
|
||||
}
|
||||
}
|
||||
class ViewportSize {
|
||||
int width;
|
||||
int height;
|
||||
public int width;
|
||||
public int height;
|
||||
|
||||
public ViewportSize withWidth(int width) {
|
||||
this.width = width;
|
||||
@@ -620,7 +620,7 @@ public interface Page {
|
||||
}
|
||||
}
|
||||
class TextContentOptions {
|
||||
Integer timeout;
|
||||
public Integer timeout;
|
||||
|
||||
public TextContentOptions withTimeout(Integer timeout) {
|
||||
this.timeout = timeout;
|
||||
@@ -628,9 +628,9 @@ public interface Page {
|
||||
}
|
||||
}
|
||||
class TypeOptions {
|
||||
Integer delay;
|
||||
Boolean noWaitAfter;
|
||||
Integer timeout;
|
||||
public Integer delay;
|
||||
public Boolean noWaitAfter;
|
||||
public Integer timeout;
|
||||
|
||||
public TypeOptions withDelay(Integer delay) {
|
||||
this.delay = delay;
|
||||
@@ -646,9 +646,9 @@ public interface Page {
|
||||
}
|
||||
}
|
||||
class UncheckOptions {
|
||||
Boolean force;
|
||||
Boolean noWaitAfter;
|
||||
Integer timeout;
|
||||
public Boolean force;
|
||||
public Boolean noWaitAfter;
|
||||
public Integer timeout;
|
||||
|
||||
public UncheckOptions withForce(Boolean force) {
|
||||
this.force = force;
|
||||
@@ -664,8 +664,8 @@ public interface Page {
|
||||
}
|
||||
}
|
||||
class PageViewportSize {
|
||||
int width;
|
||||
int height;
|
||||
public int width;
|
||||
public int height;
|
||||
|
||||
public PageViewportSize withWidth(int width) {
|
||||
this.width = width;
|
||||
@@ -677,8 +677,8 @@ public interface Page {
|
||||
}
|
||||
}
|
||||
class WaitForFunctionOptions {
|
||||
double polling;
|
||||
Integer timeout;
|
||||
public double polling;
|
||||
public Integer timeout;
|
||||
|
||||
public WaitForFunctionOptions withPolling(double polling) {
|
||||
this.polling = polling;
|
||||
@@ -690,7 +690,7 @@ public interface Page {
|
||||
}
|
||||
}
|
||||
class WaitForLoadStateOptions {
|
||||
Integer timeout;
|
||||
public Integer timeout;
|
||||
|
||||
public WaitForLoadStateOptions withTimeout(Integer timeout) {
|
||||
this.timeout = timeout;
|
||||
@@ -698,10 +698,10 @@ public interface Page {
|
||||
}
|
||||
}
|
||||
class WaitForNavigationOptions {
|
||||
enum WaitUntil { DOMCONTENTLOADED, LOAD, NETWORKIDLE}
|
||||
Integer timeout;
|
||||
String url;
|
||||
WaitUntil waitUntil;
|
||||
public enum WaitUntil { DOMCONTENTLOADED, LOAD, NETWORKIDLE}
|
||||
public Integer timeout;
|
||||
public String url;
|
||||
public WaitUntil waitUntil;
|
||||
|
||||
public WaitForNavigationOptions withTimeout(Integer timeout) {
|
||||
this.timeout = timeout;
|
||||
@@ -717,7 +717,7 @@ public interface Page {
|
||||
}
|
||||
}
|
||||
class WaitForRequestOptions {
|
||||
Integer timeout;
|
||||
public Integer timeout;
|
||||
|
||||
public WaitForRequestOptions withTimeout(Integer timeout) {
|
||||
this.timeout = timeout;
|
||||
@@ -725,7 +725,7 @@ public interface Page {
|
||||
}
|
||||
}
|
||||
class WaitForResponseOptions {
|
||||
Integer timeout;
|
||||
public Integer timeout;
|
||||
|
||||
public WaitForResponseOptions withTimeout(Integer timeout) {
|
||||
this.timeout = timeout;
|
||||
@@ -733,9 +733,9 @@ public interface Page {
|
||||
}
|
||||
}
|
||||
class WaitForSelectorOptions {
|
||||
enum State { ATTACHED, DETACHED, HIDDEN, VISIBLE}
|
||||
State state;
|
||||
Integer timeout;
|
||||
public enum State { ATTACHED, DETACHED, HIDDEN, VISIBLE}
|
||||
public State state;
|
||||
public Integer timeout;
|
||||
|
||||
public WaitForSelectorOptions withState(State state) {
|
||||
this.state = state;
|
||||
|
||||
@@ -21,7 +21,7 @@ import java.util.function.BiConsumer;
|
||||
|
||||
public interface Request {
|
||||
class RequestFailure {
|
||||
String errorText;
|
||||
public String errorText;
|
||||
|
||||
public RequestFailure withErrorText(String errorText) {
|
||||
this.errorText = errorText;
|
||||
|
||||
@@ -21,9 +21,9 @@ import java.util.function.BiConsumer;
|
||||
|
||||
public interface Route {
|
||||
class ContinueOverrides {
|
||||
String method;
|
||||
String postData;
|
||||
Map<String, String> headers;
|
||||
public String method;
|
||||
public String postData;
|
||||
public Map<String, String> headers;
|
||||
|
||||
public ContinueOverrides withMethod(String method) {
|
||||
this.method = method;
|
||||
@@ -39,11 +39,11 @@ public interface Route {
|
||||
}
|
||||
}
|
||||
class FulfillResponse {
|
||||
Integer status;
|
||||
Map<String, String> headers;
|
||||
String contentType;
|
||||
String body;
|
||||
String path;
|
||||
public Integer status;
|
||||
public Map<String, String> headers;
|
||||
public String contentType;
|
||||
public String body;
|
||||
public String path;
|
||||
|
||||
public FulfillResponse withStatus(Integer status) {
|
||||
this.status = status;
|
||||
|
||||
@@ -21,7 +21,7 @@ import java.util.function.BiConsumer;
|
||||
|
||||
public interface Selectors {
|
||||
class RegisterOptions {
|
||||
Boolean contentScript;
|
||||
public Boolean contentScript;
|
||||
|
||||
public RegisterOptions withContentScript(Boolean contentScript) {
|
||||
this.contentScript = contentScript;
|
||||
|
||||
@@ -21,10 +21,10 @@ import java.util.function.BiConsumer;
|
||||
|
||||
public interface WebKitBrowser {
|
||||
class NewContextOptions {
|
||||
enum ColorScheme { DARK, LIGHT, NO_PREFERENCE}
|
||||
public enum ColorScheme { DARK, LIGHT, NO_PREFERENCE}
|
||||
public class Viewport {
|
||||
int width;
|
||||
int height;
|
||||
public int width;
|
||||
public int height;
|
||||
|
||||
Viewport() {
|
||||
}
|
||||
@@ -42,9 +42,9 @@ public interface WebKitBrowser {
|
||||
}
|
||||
}
|
||||
public class Geolocation {
|
||||
double latitude;
|
||||
double longitude;
|
||||
double accuracy;
|
||||
public double latitude;
|
||||
public double longitude;
|
||||
public double accuracy;
|
||||
|
||||
Geolocation() {
|
||||
}
|
||||
@@ -66,8 +66,8 @@ public interface WebKitBrowser {
|
||||
}
|
||||
}
|
||||
public class HttpCredentials {
|
||||
String username;
|
||||
String password;
|
||||
public String username;
|
||||
public String password;
|
||||
|
||||
HttpCredentials() {
|
||||
}
|
||||
@@ -85,8 +85,8 @@ public interface WebKitBrowser {
|
||||
}
|
||||
}
|
||||
public class VideoSize {
|
||||
int width;
|
||||
int height;
|
||||
public int width;
|
||||
public int height;
|
||||
|
||||
VideoSize() {
|
||||
}
|
||||
@@ -103,28 +103,28 @@ public interface WebKitBrowser {
|
||||
return this;
|
||||
}
|
||||
}
|
||||
Boolean acceptDownloads;
|
||||
Boolean ignoreHTTPSErrors;
|
||||
Boolean bypassCSP;
|
||||
Viewport viewport;
|
||||
String userAgent;
|
||||
Integer deviceScaleFactor;
|
||||
Boolean isMobile;
|
||||
Boolean hasTouch;
|
||||
Boolean javaScriptEnabled;
|
||||
String timezoneId;
|
||||
Geolocation geolocation;
|
||||
String locale;
|
||||
List<String> permissions;
|
||||
Map<String, String> extraHTTPHeaders;
|
||||
Boolean offline;
|
||||
HttpCredentials httpCredentials;
|
||||
ColorScheme colorScheme;
|
||||
Logger logger;
|
||||
String relativeArtifactsPath;
|
||||
Boolean recordVideos;
|
||||
VideoSize videoSize;
|
||||
Boolean recordTrace;
|
||||
public Boolean acceptDownloads;
|
||||
public Boolean ignoreHTTPSErrors;
|
||||
public Boolean bypassCSP;
|
||||
public Viewport viewport;
|
||||
public String userAgent;
|
||||
public Integer deviceScaleFactor;
|
||||
public Boolean isMobile;
|
||||
public Boolean hasTouch;
|
||||
public Boolean javaScriptEnabled;
|
||||
public String timezoneId;
|
||||
public Geolocation geolocation;
|
||||
public String locale;
|
||||
public List<String> permissions;
|
||||
public Map<String, String> extraHTTPHeaders;
|
||||
public Boolean offline;
|
||||
public HttpCredentials httpCredentials;
|
||||
public ColorScheme colorScheme;
|
||||
public Logger logger;
|
||||
public String relativeArtifactsPath;
|
||||
public Boolean recordVideos;
|
||||
public VideoSize videoSize;
|
||||
public Boolean recordTrace;
|
||||
|
||||
public NewContextOptions withAcceptDownloads(Boolean acceptDownloads) {
|
||||
this.acceptDownloads = acceptDownloads;
|
||||
@@ -216,10 +216,10 @@ public interface WebKitBrowser {
|
||||
}
|
||||
}
|
||||
class NewPageOptions {
|
||||
enum ColorScheme { DARK, LIGHT, NO_PREFERENCE}
|
||||
public enum ColorScheme { DARK, LIGHT, NO_PREFERENCE}
|
||||
public class Viewport {
|
||||
int width;
|
||||
int height;
|
||||
public int width;
|
||||
public int height;
|
||||
|
||||
Viewport() {
|
||||
}
|
||||
@@ -237,9 +237,9 @@ public interface WebKitBrowser {
|
||||
}
|
||||
}
|
||||
public class Geolocation {
|
||||
double latitude;
|
||||
double longitude;
|
||||
double accuracy;
|
||||
public double latitude;
|
||||
public double longitude;
|
||||
public double accuracy;
|
||||
|
||||
Geolocation() {
|
||||
}
|
||||
@@ -261,8 +261,8 @@ public interface WebKitBrowser {
|
||||
}
|
||||
}
|
||||
public class HttpCredentials {
|
||||
String username;
|
||||
String password;
|
||||
public String username;
|
||||
public String password;
|
||||
|
||||
HttpCredentials() {
|
||||
}
|
||||
@@ -280,8 +280,8 @@ public interface WebKitBrowser {
|
||||
}
|
||||
}
|
||||
public class VideoSize {
|
||||
int width;
|
||||
int height;
|
||||
public int width;
|
||||
public int height;
|
||||
|
||||
VideoSize() {
|
||||
}
|
||||
@@ -298,28 +298,28 @@ public interface WebKitBrowser {
|
||||
return this;
|
||||
}
|
||||
}
|
||||
Boolean acceptDownloads;
|
||||
Boolean ignoreHTTPSErrors;
|
||||
Boolean bypassCSP;
|
||||
Viewport viewport;
|
||||
String userAgent;
|
||||
Integer deviceScaleFactor;
|
||||
Boolean isMobile;
|
||||
Boolean hasTouch;
|
||||
Boolean javaScriptEnabled;
|
||||
String timezoneId;
|
||||
Geolocation geolocation;
|
||||
String locale;
|
||||
List<String> permissions;
|
||||
Map<String, String> extraHTTPHeaders;
|
||||
Boolean offline;
|
||||
HttpCredentials httpCredentials;
|
||||
ColorScheme colorScheme;
|
||||
Logger logger;
|
||||
String relativeArtifactsPath;
|
||||
Boolean recordVideos;
|
||||
VideoSize videoSize;
|
||||
Boolean recordTrace;
|
||||
public Boolean acceptDownloads;
|
||||
public Boolean ignoreHTTPSErrors;
|
||||
public Boolean bypassCSP;
|
||||
public Viewport viewport;
|
||||
public String userAgent;
|
||||
public Integer deviceScaleFactor;
|
||||
public Boolean isMobile;
|
||||
public Boolean hasTouch;
|
||||
public Boolean javaScriptEnabled;
|
||||
public String timezoneId;
|
||||
public Geolocation geolocation;
|
||||
public String locale;
|
||||
public List<String> permissions;
|
||||
public Map<String, String> extraHTTPHeaders;
|
||||
public Boolean offline;
|
||||
public HttpCredentials httpCredentials;
|
||||
public ColorScheme colorScheme;
|
||||
public Logger logger;
|
||||
public String relativeArtifactsPath;
|
||||
public Boolean recordVideos;
|
||||
public VideoSize videoSize;
|
||||
public Boolean recordTrace;
|
||||
|
||||
public NewPageOptions withAcceptDownloads(Boolean acceptDownloads) {
|
||||
this.acceptDownloads = acceptDownloads;
|
||||
|
||||
@@ -32,7 +32,7 @@ class Message {
|
||||
String method;
|
||||
JsonObject params;
|
||||
JsonElement result;
|
||||
JsonObject error;
|
||||
SerializedError error;
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
@@ -134,10 +134,12 @@ public class Connection {
|
||||
}
|
||||
callbacks.remove(message.id);
|
||||
// System.out.println("Message: " + message.id + " " + message);
|
||||
if (message.error == null)
|
||||
if (message.error == null) {
|
||||
callback.complete(message);
|
||||
else
|
||||
} else {
|
||||
System.out.println(message.error);
|
||||
callback.completeExceptionally(new RuntimeException(message.error.toString()));
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -294,9 +294,29 @@ public class FrameImpl extends ChannelOwner implements Frame {
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
private static String toProtocol(SetContentOptions.WaitUntil waitUntil) {
|
||||
if (waitUntil == null) {
|
||||
waitUntil = SetContentOptions.WaitUntil.LOAD;
|
||||
}
|
||||
switch (waitUntil) {
|
||||
case DOMCONTENTLOADED: return "domcontentloaded";
|
||||
case LOAD: return "load";
|
||||
case NETWORKIDLE: return "networkidle";
|
||||
default: throw new RuntimeException("Unexpected value: " + waitUntil);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setContent(String html, SetContentOptions options) {
|
||||
|
||||
if (options == null) {
|
||||
options = new SetContentOptions();
|
||||
}
|
||||
JsonObject params = new Gson().toJsonTree(options).getAsJsonObject();
|
||||
params.addProperty("html", html);
|
||||
params.remove("waitUntil");
|
||||
params.addProperty("waitUntil", toProtocol(options.waitUntil));
|
||||
sendMessage("setContent", params);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -16,6 +16,7 @@
|
||||
|
||||
package com.microsoft.playwright.impl;
|
||||
|
||||
import com.google.gson.Gson;
|
||||
import com.google.gson.JsonElement;
|
||||
import com.google.gson.JsonObject;
|
||||
import com.microsoft.playwright.*;
|
||||
@@ -295,7 +296,10 @@ public class PageImpl extends ChannelOwner implements Page {
|
||||
|
||||
@Override
|
||||
public void setContent(String html, SetContentOptions options) {
|
||||
|
||||
// TODO: generate converter.
|
||||
String json = new Gson().toJson(options);
|
||||
Frame.SetContentOptions frameOptions = new Gson().fromJson(json, Frame.SetContentOptions.class);
|
||||
mainFrame.setContent(html, frameOptions);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -56,7 +56,6 @@ class SerializedArgument{
|
||||
Channel[] handles;
|
||||
}
|
||||
|
||||
|
||||
class AXNode{
|
||||
String role;
|
||||
String name;
|
||||
@@ -95,8 +94,27 @@ class SerializedError{
|
||||
String message;
|
||||
String name;
|
||||
String stack;
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "Error {\n" +
|
||||
" message='" + message + '\n' +
|
||||
" name='" + name + '\n' +
|
||||
" stack='" + stack + '\n' +
|
||||
'}';
|
||||
}
|
||||
}
|
||||
Error error;
|
||||
SerializedValue value;
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
if (error != null) {
|
||||
return error.toString();
|
||||
}
|
||||
return "SerializedError{" +
|
||||
"value=" + value +
|
||||
'}';
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -65,5 +65,15 @@ public class TestClick {
|
||||
page.navigate(server.PREFIX + "/input/button.html");
|
||||
page.click("button");
|
||||
assertEquals("Clicked", page.evaluate("result"));
|
||||
System.out.println("done 1");
|
||||
}
|
||||
|
||||
@Test
|
||||
void should_click_svg() {
|
||||
page.setContent("<svg height='100' width='100'>\n" +
|
||||
"<circle onclick='javascript:window.__CLICKED=42' cx='50' cy='50' r='40' stroke='black' stroke-width='3' fill='red'/>\n" +
|
||||
"</svg>\n");
|
||||
page.click("circle");
|
||||
assertEquals(42, page.evaluate("__CLICKED"));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user