Enum PlayWrightConfigurationProperties
- java.lang.Object
-
- java.lang.Enum<PlayWrightConfigurationProperties>
-
- net.serenitybdd.screenplay.playwright.PlayWrightConfigurationProperties
-
- All Implemented Interfaces:
Serializable,Comparable<PlayWrightConfigurationProperties>
public enum PlayWrightConfigurationProperties extends Enum<PlayWrightConfigurationProperties>
-
-
Enum Constant Summary
Enum Constants Enum Constant Description ARGSAdditional arguments to pass to the browser instance (see https://peter.sh/experiments/chromium-command-line-switches/).BROWSER_CHANNELBrowser distribution channel.BROWSER_TYPECHROMIUM_SANDBOXEnable Chromium sandboxing.DEVTOOLS**Chromium-only** Whether to auto-open a Developer Tools panel for each tab.DOWNLOADS_PATHIf specified, accepted downloads are downloaded into this directory.ENVSpecify environment variables that will be visible to the browser.EXECUTABLE_PATHPath to a browser executable to run instead of the bundled one.HANDLE_SIGHUPClose the browser process on SIGHUP.HANDLE_SIGINTClose the browser process on Ctrl-C.HANDLE_SIGTERMClose the browser process on SIGTERM.HEADLESSWhether to run browser in headless mode.IGNORE_ALL_DEFAULT_APPSIftrue, Playwright does not pass its own configurations args and only uses the ones fromargs.IGNORE_DEFAULT_APPSIftrue, Playwright does not pass its own configurations args and only uses the ones fromargs.PROXYNetwork proxy settings.PROXY_BYPASSPROXY_PASSWORDPROXY_SERVERPROXY_USERNAMESLOW_MOSlows down Playwright operations by the specified amount of milliseconds.TIMEOUTMaximum time in milliseconds to wait for the browser instance to start.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description Optional<Boolean>asBooleanFrom(EnvironmentVariables environmentVariables)Optional<com.microsoft.playwright.options.BrowserChannel>asBrowserChannelFrom(EnvironmentVariables environmentVariables)Optional<Double>asDoubleFrom(EnvironmentVariables environmentVariables)Optional<Map<String,String>>asJsonMapFrom(EnvironmentVariables environmentVariables)Optional<List<String>>asListOfStringsFrom(EnvironmentVariables environmentVariables)Optional<Path>asPathFrom(EnvironmentVariables environmentVariables)Optional<com.microsoft.playwright.options.Proxy>asProxyFrom(EnvironmentVariables environmentVariables)Optional<String>asStringFrom(EnvironmentVariables environmentVariables)static PlayWrightConfigurationPropertiesvalueOf(String name)Returns the enum constant of this type with the specified name.static PlayWrightConfigurationProperties[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
BROWSER_TYPE
public static final PlayWrightConfigurationProperties BROWSER_TYPE
-
ARGS
public static final PlayWrightConfigurationProperties ARGS
Additional arguments to pass to the browser instance (see https://peter.sh/experiments/chromium-command-line-switches/).
-
BROWSER_CHANNEL
public static final PlayWrightConfigurationProperties BROWSER_CHANNEL
Browser distribution channel.
-
CHROMIUM_SANDBOX
public static final PlayWrightConfigurationProperties CHROMIUM_SANDBOX
Enable Chromium sandboxing. Defaults tofalse.
-
DEVTOOLS
public static final PlayWrightConfigurationProperties DEVTOOLS
**Chromium-only** Whether to auto-open a Developer Tools panel for each tab. If this option istrue, theheadlessoption will be setfalse.
-
DOWNLOADS_PATH
public static final PlayWrightConfigurationProperties DOWNLOADS_PATH
If specified, accepted downloads are downloaded into this directory. Otherwise, temporary directory is created and is deleted when browser is closed.
-
ENV
public static final PlayWrightConfigurationProperties ENV
Specify environment variables that will be visible to the browser. Defaults toprocess.env.
-
EXECUTABLE_PATH
public static final PlayWrightConfigurationProperties EXECUTABLE_PATH
Path to a browser executable to run instead of the bundled one. IfexecutablePathis a relative path, then it is resolved relative to the current working directory. Note that Playwright only works with the bundled Chromium, Firefox or WebKit, use at your own risk.
-
HANDLE_SIGHUP
public static final PlayWrightConfigurationProperties HANDLE_SIGHUP
Close the browser process on SIGHUP. Defaults totrue.
-
HANDLE_SIGINT
public static final PlayWrightConfigurationProperties HANDLE_SIGINT
Close the browser process on Ctrl-C. Defaults totrue.
-
HANDLE_SIGTERM
public static final PlayWrightConfigurationProperties HANDLE_SIGTERM
Close the browser process on SIGTERM. Defaults totrue.
-
HEADLESS
public static final PlayWrightConfigurationProperties HEADLESS
-
IGNORE_ALL_DEFAULT_APPS
public static final PlayWrightConfigurationProperties IGNORE_ALL_DEFAULT_APPS
Iftrue, Playwright does not pass its own configurations args and only uses the ones fromargs. Dangerous option; use with care. Defaults tofalse.
-
IGNORE_DEFAULT_APPS
public static final PlayWrightConfigurationProperties IGNORE_DEFAULT_APPS
Iftrue, Playwright does not pass its own configurations args and only uses the ones fromargs. Dangerous option; use with care.
-
SLOW_MO
public static final PlayWrightConfigurationProperties SLOW_MO
Slows down Playwright operations by the specified amount of milliseconds. Useful so that you can see what is going on.
-
TIMEOUT
public static final PlayWrightConfigurationProperties TIMEOUT
Maximum time in milliseconds to wait for the browser instance to start. Defaults to30000(30 seconds). Pass0to disable timeout.
-
PROXY
public static final PlayWrightConfigurationProperties PROXY
Network proxy settings. You define the proxy settings using the following four properties (server, bypass, username, password)
-
PROXY_SERVER
public static final PlayWrightConfigurationProperties PROXY_SERVER
-
PROXY_BYPASS
public static final PlayWrightConfigurationProperties PROXY_BYPASS
-
PROXY_USERNAME
public static final PlayWrightConfigurationProperties PROXY_USERNAME
-
PROXY_PASSWORD
public static final PlayWrightConfigurationProperties PROXY_PASSWORD
-
-
Method Detail
-
values
public static PlayWrightConfigurationProperties[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (PlayWrightConfigurationProperties c : PlayWrightConfigurationProperties.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static PlayWrightConfigurationProperties valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum type has no constant with the specified nameNullPointerException- if the argument is null
-
asBrowserChannelFrom
public Optional<com.microsoft.playwright.options.BrowserChannel> asBrowserChannelFrom(EnvironmentVariables environmentVariables)
-
asStringFrom
public Optional<String> asStringFrom(EnvironmentVariables environmentVariables)
-
asBooleanFrom
public Optional<Boolean> asBooleanFrom(EnvironmentVariables environmentVariables)
-
asDoubleFrom
public Optional<Double> asDoubleFrom(EnvironmentVariables environmentVariables)
-
asPathFrom
public Optional<Path> asPathFrom(EnvironmentVariables environmentVariables)
-
asProxyFrom
public Optional<com.microsoft.playwright.options.Proxy> asProxyFrom(EnvironmentVariables environmentVariables)
-
asListOfStringsFrom
public Optional<List<String>> asListOfStringsFrom(EnvironmentVariables environmentVariables)
-
asJsonMapFrom
public Optional<Map<String,String>> asJsonMapFrom(EnvironmentVariables environmentVariables)
-
-