public class PropertiesBackendConfiguration extends BaseConfiguration implements ConfigurationProperties
ConfigurationProperties.DriverLifecycle, ConfigurationProperties.TriggerMode| Modifier and Type | Field and Description |
|---|---|
static String |
PROPERTIES_PREFIX
Default properties prefix.
|
| Modifier | Constructor and Description |
|---|---|
protected |
PropertiesBackendConfiguration(PropertiesBackend propertiesReader)
Creates a new abstract properties configuration, using default properties prefix.
|
protected |
PropertiesBackendConfiguration(PropertiesBackend propertiesReader,
String... prefixes)
Creates a new abstract properties configuration, using given properties prefixes.
|
| Modifier and Type | Method and Description |
|---|---|
Long |
getAwaitAtMost()
awaitAtMost
|
Long |
getAwaitPollingEvery()
awaitPollingEvery
|
String |
getBaseUrl()
baseUrl
|
org.openqa.selenium.Capabilities |
getCapabilities()
capabilities
|
Class<? extends ConfigurationProperties> |
getConfigurationDefaults()
configurationDefaults
|
Class<? extends ConfigurationFactory> |
getConfigurationFactory()
configurationFactory
|
String |
getCustomProperty(String propertyName)
Get custom property value.
|
Boolean |
getDeleteCookies()
deleteCookies
|
ConfigurationProperties.DriverLifecycle |
getDriverLifecycle()
driverLifecycle
|
Boolean |
getEventsEnabled()
eventsEnabled
|
ConfigurationProperties.TriggerMode |
getHtmlDumpMode()
htmlDumpMode
|
String |
getHtmlDumpPath()
htmlDumpPath
|
Long |
getImplicitlyWait()
implicitlyWait
|
Long |
getPageLoadTimeout()
pageLoadTimeout
|
protected String |
getPropertyImpl(String propertyName)
Get the property value used by underlying property storage.
|
String |
getRemoteUrl()
remoteUrl
|
ConfigurationProperties.TriggerMode |
getScreenshotMode()
screenshotMode
|
String |
getScreenshotPath()
screenshotPath
|
Long |
getScriptTimeout()
scriptTimeout
|
String |
getWebDriver()
webDriver
|
protected URL |
newURL(String url)
Creates a new URL from it's representation
|
public static final String PROPERTIES_PREFIX
protected PropertiesBackendConfiguration(PropertiesBackend propertiesReader)
propertiesReader - properties readerprotected PropertiesBackendConfiguration(PropertiesBackend propertiesReader, String... prefixes)
propertiesReader - properties readerprefixes - array of allowed prefixesprotected String getPropertyImpl(String propertyName)
propertyName - property keyprotected URL newURL(String url) throws MalformedURLException
url - urlMalformedURLException - if given url is not validpublic Class<? extends ConfigurationFactory> getConfigurationFactory()
ConfigurationPropertiesconfigurationFactoryproperty. Set this to a class implementing
ConfigurationFactory to customize the ways properties are read.
This allow to configure properties from sources that are not supported by default FluentLenium.
Default value is DefaultConfigurationFactory class.getConfigurationFactory in interface ConfigurationPropertiesConfigurationFactory class.public Class<? extends ConfigurationProperties> getConfigurationDefaults()
ConfigurationPropertiesconfigurationDefaultsproperty. Set this to a class implementing
ConfigurationProperties to provide the default values
of the configuration properties.
Default value is ConfigurationDefaultsgetConfigurationDefaults in interface ConfigurationPropertiesConfigurationProperties instance with default values.public String getWebDriver()
ConfigurationPropertieswebDriverproperty. Sets the WebDriver type to use. When FluentLenium needs to create a new
WebDriver instance, it calls FluentAdapter.newWebDriver()
which delegates to
WebDriversRegistryImpl.newWebDriver(String, Capabilities, ConfigurationProperties)
registry using the value stored in webDriver and capabilities property.
Possible values are "firefox", "chrome", "ie", "htmlunit", or any class name implementing WebDriver.
Default value is "firefox".getWebDriver in interface ConfigurationPropertiesFluentAdapter.newWebDriver()public String getRemoteUrl()
ConfigurationPropertiesremoteUrlproperty. Sets the remoteUrl for "remote" webDriver.
getRemoteUrl in interface ConfigurationPropertiesRemoteWebDriverpublic org.openqa.selenium.Capabilities getCapabilities()
ConfigurationPropertiescapabilitiesproperty. Sets the Capabilities to use, as a JSON Object or a URL pointing to a JSON Object. Default value is "null".
getCapabilities in interface ConfigurationPropertiesCapabilities,
Selenium DesiredCapabilities Wiki Pagepublic ConfigurationProperties.DriverLifecycle getDriverLifecycle()
ConfigurationPropertiesdriverLifecycleproperty. Sets the lifecycle of the WebDriver. WebDriver is fully managed by FluentLenium, so you should never create or quit a WebDriver by yourself. Please keep in mind that this configures when drivers are created and exited at runtime, but it does not deal with concurrency of your tests. Default value is METHOD.
getDriverLifecycle in interface ConfigurationPropertiespublic Boolean getDeleteCookies()
ConfigurationPropertiesdeleteCookiesproperty. When using CLASS or JVM
driverLifecycleconfiguration property, allow to delete cookies between each test. Default value is false.
getDeleteCookies in interface ConfigurationPropertiespublic String getBaseUrl()
ConfigurationPropertiesbaseUrlproperty. Sets the base URL used to build absolute URL when relative URL is given to
NavigationControl.goTo(String).
Default value is null.getBaseUrl in interface ConfigurationPropertiespublic Boolean getEventsEnabled()
ConfigurationPropertieseventsEnabledproperty. Enables
EventsControl.events() by wrapping the WebDriver in
EventFiringWebDriver.
Default value is true.getEventsEnabled in interface ConfigurationPropertiespublic Long getPageLoadTimeout()
ConfigurationPropertiespageLoadTimeoutproperty. Sets the amount of time in millisecond to wait for a page load to complete before throwing an error. If the timeout is negative, page loads can be indefinite. Default value is null.
getPageLoadTimeout in interface ConfigurationPropertiesWebDriver.Timeouts.pageLoadTimeout(long, java.util.concurrent.TimeUnit)public Long getImplicitlyWait()
ConfigurationPropertiesimplicitlyWaitproperty. Specifies the amount of time in millisecond the driver should wait when searching for an element if it is not immediately present. Default value is null.
getImplicitlyWait in interface ConfigurationPropertiesWebDriver.Timeouts.implicitlyWait(long, java.util.concurrent.TimeUnit)public Long getScriptTimeout()
ConfigurationPropertiesscriptTimeoutproperty. Sets the amount of time in millisecond to wait for an asynchronous script to finish execution before throwing an error. If the timeout is negative, then the script will be allowed to run indefinitely. Default value is null.
getScriptTimeout in interface ConfigurationPropertiesWebDriver.Timeouts.setScriptTimeout(long, java.util.concurrent.TimeUnit)public Long getAwaitAtMost()
ConfigurationPropertiesawaitAtMostproperty. Sets the default timeout in millisecond when using
AwaitControl.await() or
Wait hook.getAwaitAtMost in interface ConfigurationPropertiesFluentWait.atMost(long, java.util.concurrent.TimeUnit),
FluentWait.atMost(long)public Long getAwaitPollingEvery()
ConfigurationPropertiesawaitPollingEveryproperty. Sets the default polling frequency in millisecond when using
AwaitControl.await() or
Wait hook.getAwaitPollingEvery in interface ConfigurationPropertiesFluentWait.pollingEvery(long, java.util.concurrent.TimeUnit),
FluentWait.pollingEvery(long)public String getScreenshotPath()
ConfigurationPropertiesscreenshotPathproperty. Sets the filesystem path where screenshot will be saved when calling
SnapshotControl.takeScreenShot() or
SnapshotControl.takeScreenShot(String).
Default value is null.getScreenshotPath in interface ConfigurationPropertiespublic String getHtmlDumpPath()
ConfigurationPropertieshtmlDumpPathproperty. Sets the filesystem path where screenshot will be saved when calling
SnapshotControl.takeHtmlDump() or
SnapshotControl.takeHtmlDump(String).
Default value is null.getHtmlDumpPath in interface ConfigurationPropertiespublic ConfigurationProperties.TriggerMode getScreenshotMode()
ConfigurationPropertiesscreenshotModeproperty. Sets the trigger mode of screenshots. Can be {AUTOMATIC_ON_FAIL} to take screenshot when the test fail or {MANUAL}. Default value is null.
getScreenshotMode in interface ConfigurationPropertiesConfigurationProperties.TriggerModepublic ConfigurationProperties.TriggerMode getHtmlDumpMode()
ConfigurationPropertieshtmlDumpModeproperty. Sets the trigger mode of htmlDump. Can be {AUTOMATIC_ON_FAIL} to take html dump when the test fail or {MANUAL}. Default value is null.
getHtmlDumpMode in interface ConfigurationPropertiesConfigurationProperties.TriggerModepublic String getCustomProperty(String propertyName)
ConfigurationPropertiesgetCustomProperty in interface ConfigurationPropertiespropertyName - name of the propertyCopyright © 2016 FluentLenium. All Rights Reserved.