public class Configuration
extends java.lang.Object
These system properties can be additonally used having effect on every new created browser in test. For example as -D<property>=<value> in command-line
chromeoptions.args - Sets the arguments for chrome options, parameters are comma separated If comma is a part of the value, use double quotes around the argument Non-official list of parameters can be found at https://peter.sh/experiments/chromium-command-line-switches/ Example: --no-sandbox,--disable-3d-apis,"--user-agent=Firefox 45, Mozilla"
chromeoptions.prefs - Sets the preferences for chrome options, which are comma separated keyX=valueX preferences. If comma is a part of the value, use double quotes around the preference List of preferences can be found at https://chromium.googlesource.com/chromium/src/+/master/chrome/common/pref_names.cc Example: homepage=http://google.com,"intl.allowed_languages=en,ru,es"
Modifier and Type | Field and Description |
---|---|
static com.codeborne.selenide.AssertionMode |
assertionMode
Assertion mode
|
static java.lang.String |
baseUrl
Base url for open() function calls
Can be configured either programmatically, via selenide.properties file or by system property "-Dselenide.baseUrl=http://myhost".
|
static java.lang.String |
browser
Which browser to use.
|
static java.lang.String |
browserBinary
Sets the path to browser executable.
|
static org.openqa.selenium.MutableCapabilities |
browserCapabilities
Browser capabilities.
|
static java.lang.String |
browserPosition
The browser window position on screen.
|
static java.lang.String |
browserSize
The browser window size.
|
static java.lang.String |
browserVersion
Which browser version to use (for Internet Explorer).
|
static boolean |
clickViaJs
ATTENTION! Automatic WebDriver waiting after click isn't working in case of using this feature.
|
static java.lang.String |
downloadsFolder
Folder to store downloaded files to.
|
static boolean |
driverManagerEnabled
Controls Selenide and WebDriverManager integration.
|
static boolean |
fastSetValue
If set to true, sets value by javascript instead of using Selenium built-in "sendKey" function
(that is quite slow because it sends every character separately).
|
static com.codeborne.selenide.FileDownloadMode |
fileDownload
Defines if files are downloaded via direct HTTP or vie selenide embedded proxy server
Can be configured either programmatically, via selenide.properties file or by system property "-Dselenide.fileDownload=PROXY"
Default: HTTPGET |
static boolean |
headless
Enables the ability to run the browser in headless mode.
|
static boolean |
holdBrowserOpen
If holdBrowserOpen is true, browser window stays open after running tests.
|
static java.lang.String |
pageLoadStrategy
Should webdriver wait until page is completely loaded.
|
static long |
pageLoadTimeout
Timeout for loading a web page (in milliseconds).
|
static long |
pollingInterval
Interval in milliseconds, when checking if a single element or collection elements are appeared
Can be configured either programmatically, via selenide.properties file or by system property "-Dselenide.pollingInterval=50"
Default value: 200 (milliseconds) |
static boolean |
proxyEnabled
If Selenide should run browser through its own proxy server.
|
static java.lang.String |
proxyHost
Host of Selenide proxy server.
|
static int |
proxyPort
Port of Selenide proxy server.
|
static java.lang.String |
remote
URL of remote web driver (in case of using Selenium Grid).
|
static boolean |
reopenBrowserOnFail
Should Selenide re-spawn browser if it's disappeared (hangs, broken, unexpectedly closed).
|
static java.lang.String |
reportsFolder
Folder to store screenshots to.
|
static java.lang.String |
reportsUrl
Optional: URL of CI server where reports are published to.
|
static boolean |
savePageSource
Defines if Selenide saves page source on failing tests.
|
static boolean |
screenshots
Defines if Selenide takes screenshots on failing tests.
|
static com.codeborne.selenide.SelectorMode |
selectorMode
Choose how Selenide should retrieve web elements: using default CSS or Sizzle (CSS3).
|
static long |
timeout
Timeout in milliseconds to fail the test, if conditions still not met
Can be configured either programmatically, via selenide.properties file or by system property "-Dselenide.timeout=10000"
Default value: 4000 (milliseconds) |
static boolean |
webdriverLogsEnabled
Whether webdriver logs should be enabled.
|
Constructor and Description |
---|
Configuration() |
public static java.lang.String baseUrl
public static long timeout
public static long pollingInterval
public static boolean holdBrowserOpen
public static boolean reopenBrowserOnFail
public static java.lang.String browser
public static java.lang.String browserVersion
public static java.lang.String remote
public static java.lang.String browserSize
public static java.lang.String browserPosition
public static org.openqa.selenium.MutableCapabilities browserCapabilities
public static java.lang.String pageLoadStrategy
public static long pageLoadTimeout
public static boolean clickViaJs
public static boolean screenshots
public static boolean savePageSource
public static java.lang.String reportsFolder
public static java.lang.String downloadsFolder
public static java.lang.String reportsUrl
public static boolean fastSetValue
public static com.codeborne.selenide.SelectorMode selectorMode
Choose how Selenide should retrieve web elements: using default CSS or Sizzle (CSS3).
Can be configured either programmatically, via selenide.properties file or by system property "-Dselenide.selectorMode=Sizzle".
SelectorMode
public static com.codeborne.selenide.AssertionMode assertionMode
Assertion mode
Can be configured either programmatically, via selenide.properties file or by system property "-Dselenide.assertionMode=SOFT".
AssertionMode
public static com.codeborne.selenide.FileDownloadMode fileDownload
public static boolean proxyEnabled
public static java.lang.String proxyHost
com.browserup.bup.client.ClientUtil#getConnectableAddress()
public static int proxyPort
public static boolean driverManagerEnabled
public static boolean webdriverLogsEnabled
Whether webdriver logs should be enabled.
These logs may be useful for debugging some webdriver issues. But in most cases they are not needed (and can take quite a lot of disk space), that's why don't enable them by default.
Default: falsepublic static boolean headless
public static java.lang.String browserBinary