Class AnnotationConfiguration
- All Implemented Interfaces:
ConfigurationProperties
ConfigurationProperties based on FluentConfiguration annotation.- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from interface io.fluentlenium.configuration.ConfigurationProperties
ConfigurationProperties.DriverLifecycle, ConfigurationProperties.TriggerMode -
Constructor Summary
ConstructorsConstructorDescriptionAnnotationConfiguration(FluentConfiguration configuration) Creates a new annotation based configuration.AnnotationConfiguration(Class<?> containerClass) Creates a new annotation based configuration. -
Method Summary
Modifier and TypeMethodDescriptionawaitAtMostawaitPollingEverybaseUrlbrowserTimeoutbrowserTimeoutRetriesorg.openqa.selenium.CapabilitiescapabilitiesClass<? extends ConfigurationProperties>configurationDefaultsClass<? extends ConfigurationFactory>configurationFactorygetCustomProperty(String propertyName) Get custom property value.deleteCookiesdriverLifecycleeventsEnabledhtmlDumpModehtmlDumpPathimplicitlyWaitpageLoadTimeoutremoteUrlscreenshotModescreenshotPathscriptTimeoutwebDriver
-
Constructor Details
-
AnnotationConfiguration
Creates a new annotation based configuration.- Parameters:
containerClass- container class on which to read annotation
-
AnnotationConfiguration
Creates a new annotation based configuration.- Parameters:
configuration- annotation to read values from
-
-
Method Details
-
getConfigurationDefaults
Description copied from interface:ConfigurationPropertiesconfigurationDefaults
property.Set this to a class implementing
ConfigurationPropertiesto provide the default values of the configuration properties.Default value is
ConfigurationDefaults- Specified by:
getConfigurationDefaultsin interfaceConfigurationProperties- Returns:
- Custom
ConfigurationPropertiesinstance with default values.
-
getWebDriver
Description copied from interface:ConfigurationPropertieswebDriver
property.Sets the WebDriver type to use.
When FluentLenium needs to create a new
WebDriverinstance, it callsIFluentAdapter.newWebDriver()which delegates toWebDriversRegistryImpl.newWebDriver(String, Capabilities, ConfigurationProperties)registry using the value stored in webDriver and capabilities property.Possible values are "firefox", "chrome", "ie", "edge", "htmlunit", "safari", "opera", "remote" or any class name implementing
WebDriveror any name that is defined in the `@FactoryName` annotation of a `WebDriverFactory` implementation.Default value is "firefox".
- Specified by:
getWebDriverin interfaceConfigurationProperties- Returns:
- webDriver property value
- See Also:
-
getRemoteUrl
Description copied from interface:ConfigurationPropertiesremoteUrl
property.Sets the remoteUrl for "remote" webDriver.
- Specified by:
getRemoteUrlin interfaceConfigurationProperties- Returns:
- remoteUrl property value
- See Also:
-
getCapabilities
public org.openqa.selenium.Capabilities getCapabilities()Description copied from interface:ConfigurationPropertiescapabilities
property.Sets the Capabilities to use, as a JSON Object or a URL pointing to a JSON Object.
Default value is "null".
- Specified by:
getCapabilitiesin interfaceConfigurationProperties- Returns:
- Capabilities property value
- See Also:
-
getConfigurationFactory
Description copied from interface:ConfigurationPropertiesconfigurationFactory
property.Set this to a class implementing
ConfigurationFactoryto customize the ways properties are read. This allow to configure properties from sources that are not supported by default FluentLenium.Default value is
DefaultConfigurationFactoryclass.- Specified by:
getConfigurationFactoryin interfaceConfigurationProperties- Returns:
- Custom
ConfigurationFactoryclass.
-
getDriverLifecycle
Description copied from interface:ConfigurationPropertiesdriverLifecycle
property.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.
- Specified by:
getDriverLifecyclein interfaceConfigurationProperties- Returns:
- driverLifecycle property value
-
getBrowserTimeout
Description copied from interface:ConfigurationPropertiesbrowserTimeout
property.Sets the maximum amount of time when the browser should start responding to the WebDriver.
Default value is 60 seconds.
- Specified by:
getBrowserTimeoutin interfaceConfigurationProperties- Returns:
- long
-
getBrowserTimeoutRetries
Description copied from interface:ConfigurationPropertiesbrowserTimeoutRetries
property.Sets the maximum number of retries for failed WebDriver because of browserTimeout issues.
Default value is 2 times.
- Specified by:
getBrowserTimeoutRetriesin interfaceConfigurationProperties- Returns:
- Integer
-
getDeleteCookies
Description copied from interface:ConfigurationPropertiesdeleteCookies
property.When using CLASS or JVM
driverLifecycle
configuration property, allow to delete cookies between each test.Default value is false.
- Specified by:
getDeleteCookiesin interfaceConfigurationProperties- Returns:
- deleteCookies property value.
-
getBaseUrl
Description copied from interface:ConfigurationPropertiesbaseUrl
property.Sets the base URL used to build absolute URL when relative URL is given to
FluentControl.goTo(String).Default value is null.
- Specified by:
getBaseUrlin interfaceConfigurationProperties- Returns:
- baseUrl property value
-
getPageLoadTimeout
Description copied from interface:ConfigurationPropertiespageLoadTimeout
property.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.
- Specified by:
getPageLoadTimeoutin interfaceConfigurationProperties- Returns:
- pageLoadTimeout property value
- See Also:
-
getImplicitlyWait
Description copied from interface:ConfigurationPropertiesimplicitlyWait
property.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.
- Specified by:
getImplicitlyWaitin interfaceConfigurationProperties- Returns:
- implicitlyWait property value
- See Also:
-
getScriptTimeout
Description copied from interface:ConfigurationPropertiesscriptTimeout
property.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.
- Specified by:
getScriptTimeoutin interfaceConfigurationProperties- Returns:
- scriptTimeout property value
- See Also:
-
getAwaitAtMost
Description copied from interface:ConfigurationPropertiesawaitAtMost
property.Sets the default timeout in millisecond when using
FluentControl.await()orWaithook.- Specified by:
getAwaitAtMostin interfaceConfigurationProperties- Returns:
- awaitTimeout property value
- See Also:
-
getAwaitPollingEvery
Description copied from interface:ConfigurationPropertiesawaitPollingEvery
property.Sets the default polling frequency in millisecond when using
FluentControl.await()orWaithook.- Specified by:
getAwaitPollingEveryin interfaceConfigurationProperties- Returns:
- awaitPollingEvery property value
- See Also:
-
getEventsEnabled
Description copied from interface:ConfigurationPropertieseventsEnabled
property.Enables
FluentControl.events()by wrapping theWebDriverinEventFiringWebDriver.Default value is true.
- Specified by:
getEventsEnabledin interfaceConfigurationProperties- Returns:
- eventsEnabled property value.
-
getScreenshotPath
Description copied from interface:ConfigurationPropertiesscreenshotPath
property.Sets the filesystem path where screenshot will be saved when calling
FluentControl.takeScreenshot()orFluentControl.takeScreenshot(String).Default value is null.
- Specified by:
getScreenshotPathin interfaceConfigurationProperties- Returns:
- screenshotPath property value
-
getHtmlDumpPath
Description copied from interface:ConfigurationPropertieshtmlDumpPath
property.Sets the filesystem path where screenshot will be saved when calling
FluentControl.takeHtmlDump()orFluentControl.takeHtmlDump(String).Default value is null.
- Specified by:
getHtmlDumpPathin interfaceConfigurationProperties- Returns:
- htmlDumpPath property value
-
getScreenshotMode
Description copied from interface:ConfigurationPropertiesscreenshotMode
property.Sets the trigger mode of screenshots. Can be {AUTOMATIC_ON_FAIL} to take screenshot when the test fail or {MANUAL}.
Default value is null.
- Specified by:
getScreenshotModein interfaceConfigurationProperties- Returns:
- screenshotMode property value.
- See Also:
-
getHtmlDumpMode
Description copied from interface:ConfigurationPropertieshtmlDumpMode
property.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.
- Specified by:
getHtmlDumpModein interfaceConfigurationProperties- Returns:
- htmlDumpMode property value.
- See Also:
-
getCustomProperty
Description copied from interface:ConfigurationPropertiesGet custom property value.- Specified by:
getCustomPropertyin interfaceConfigurationProperties- Parameters:
propertyName- name of the property- Returns:
- property value
-