public class Configuration
extends java.lang.Object
| Modifier and Type | Class and Description |
|---|---|
static class |
Configuration.AssertionMode
Assertion modes available
|
static class |
Configuration.FileDownloadMode |
static class |
Configuration.SelectorMode |
| Modifier and Type | Field and Description |
|---|---|
static Configuration.AssertionMode |
assertionMode
Assertion mode - STRICT or SOFT Asserts
Default value: STRICT
|
static java.lang.String |
baseUrl
Base url for open() function calls
Can be configured either programmatically 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.remote.DesiredCapabilities |
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 |
captureJavascriptErrors
Defines if Selenide tries to capture JS errors
Can be configured either programmatically or by system property "-Dselenide.captureJavascriptErrors=false".
|
static java.lang.String |
chromeSwitches
Deprecated.
this options allowed only a single switch.
Please use instead more generic -Dchromeoptions.args=
or use -Dchromeoptions.prefs=
Value of "chrome.switches" parameter (in case of using Chrome driver).
Can be configured either programmatically or by system property,
i.e. "-Dselenide.chrome.switches=--disable-popup-blocking".
Default value: none |
static boolean |
clickViaJs
ATTENTION! Automatic WebDriver waiting after click isn't working in case of using this feature.
|
static long |
closeBrowserTimeoutMs
Timeout (in milliseconds) for closing/killing browser.
|
static long |
collectionsPollingInterval
Interval in milliseconds, when checking if a new collection elements appeared
Can be configured either programmatically or by system property "-Dselenide.collectionsPollingInterval=150"
Default value: 200 (milliseconds)
|
static long |
collectionsTimeout
Timeout in milliseconds for a collection to get completely loaded
Conditions will be checked at this point at latest, even if they are still loading
Can be configured either programmatically or by system property "-Dselenide.collectionsTimeout=10000"
Default value: 6000 (milliseconds)
|
static boolean |
dismissModalDialogs
Mock "alert" and "confirm" javascript dialogs.
|
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 Configuration.FileDownloadMode |
fileDownload
Defines if files are downloaded via direct HTTP or vie selenide emebedded proxy server
Can be configured either programmatically 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 long |
openBrowserTimeoutMs
Timeout (in milliseconds) for opening (creating) a browser (webdriver).
|
static java.lang.String |
pageLoadStrategy
Should webdriver wait until page is completely loaded.
|
static long |
pollingInterval
Interval in milliseconds, when checking if a single element is appeared
Can be configured either programmatically or by system property "-Dselenide.pollingInterval=50"
Default value: 100 (milliseconds)
|
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 Configuration.SelectorMode |
selectorMode
Choose how Selenide should retrieve web elements: using default CSS or Sizzle (CSS3)
|
static boolean |
setValueChangeEvent
If set to true, 'setValue' and 'val' methods of SelenideElement trigger changeEvent after main manipulations.
|
static boolean |
startMaximized
The browser window is maximized when started.
|
static long |
timeout
Timeout in milliseconds to fail the test, if conditions still not met
Can be configured either programmatically or by system property "-Dselenide.timeout=10000"
Default value: 4000 (milliseconds)
|
static boolean |
versatileSetValue
If set to true, 'setValue' and 'val' methods of SelenideElement can work as 'selectOptionByValue', 'selectRadio'
depending on the real control type, defined by element's tag.
|
| Constructor and Description |
|---|
Configuration() |
public static java.lang.String baseUrl
public static long collectionsTimeout
public static long timeout
public static long pollingInterval
public static long collectionsPollingInterval
public static boolean holdBrowserOpen
public static boolean reopenBrowserOnFail
Can be configured either programmatically or by system property "-Dselenide.reopenBrowserOnFail=false".
Default value: true Set this property to false if you want to disable automatic re-spawning the browser.
public static long openBrowserTimeoutMs
public static long closeBrowserTimeoutMs
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 boolean startMaximized
Default value: true
@Deprecated public static java.lang.String chromeSwitches
or use -Dchromeoptions.prefs=
Value of "chrome.switches" parameter (in case of using Chrome driver).
Can be configured either programmatically or by system property,
i.e. "-Dselenide.chrome.switches=--disable-popup-blocking".
Default value: none
public static org.openqa.selenium.remote.DesiredCapabilities browserCapabilities
public static java.lang.String pageLoadStrategy
public static boolean clickViaJs
public static boolean captureJavascriptErrors
public static boolean screenshots
public static boolean savePageSource
public static java.lang.String reportsFolder
public static java.lang.String reportsUrl
public static boolean dismissModalDialogs
public static boolean fastSetValue
public static boolean versatileSetValue
public static boolean setValueChangeEvent
public static Configuration.SelectorMode selectorMode
public static Configuration.AssertionMode assertionMode
Configuration.AssertionModepublic static Configuration.FileDownloadMode fileDownload
public static boolean driverManagerEnabled
public static boolean headless
public static java.lang.String browserBinary