All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.fluentlenium.configuration.FluentConfiguration Maven / Gradle / Ivy

There is a newer version: 5.0.4
Show newest version
package org.fluentlenium.configuration;

import java.lang.annotation.ElementType;
import java.lang.annotation.Inherited;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

/**
 * Configure a FluentLenium test class with this annotation.
 *
 * @see ConfigurationProperties
 */
@Target(ElementType.TYPE)
@Retention(RetentionPolicy.RUNTIME)
@Inherited
public @interface FluentConfiguration {
    /**
     * Boolean value used in  annotation that can has a third DEFAULT value equivalent to null.
     */
    enum BooleanValue {
        TRUE(true), FALSE(false), DEFAULT(null);

        private final Boolean value;

        /**
         * Creates a new boolean value.
         *
         * @param value boolean value
         */
        BooleanValue(Boolean value) {
            this.value = value;
        }

        /**
         * Get this Boolean value as a {@link Boolean}
         *
         * @return boolean value
         */
        Boolean asBoolean() {
            return value;
        }

    }

    /**
     * configurationFactory property.
     *
     * @return configurationFactory
     * @see ConfigurationProperties#getConfigurationFactory()
     */
    Class configurationFactory() default DefaultConfigurationFactory.class;

    /**
     * configurationDefaults property.
     *
     * @return configurationDefaults
     * @see ConfigurationProperties#getConfigurationDefaults()
     */
    Class configurationDefaults() default ConfigurationDefaults.class;

    /**
     * webDriver property.
     *
     * @return webDriver
     * @see ConfigurationProperties#getWebDriver()
     */
    String webDriver() default "";

    /**
     * remoteUrl property.
     *
     * @return remoteUrl
     * @see ConfigurationProperties#getRemoteUrl()
     */
    String remoteUrl() default "";

    /**
     * capabilities property.
     *
     * @return capabilities
     * @see ConfigurationProperties#getCapabilities()
     */
    String capabilities() default "";

    /**
     * driverLifecycle property.
     *
     * @return driverLifecycle
     * @see ConfigurationProperties#getDriverLifecycle()
     */
    ConfigurationProperties.DriverLifecycle driverLifecycle() default ConfigurationProperties.DriverLifecycle.DEFAULT;

    /**
     * browserTimeout property.
     *
     * @return long
     * @see ConfigurationProperties#getBrowserTimeout()
     */
    long browserTimeout() default 60000L;

    /**
     * browserTimeoutRetries property.
     *
     * @return int
     * @see ConfigurationProperties#getBrowserTimeoutRetries()
     */
    int browserTimeoutRetries() default 2;

    /**
     * deleteCookies property.
     *
     * @return deleteCookies
     * @see ConfigurationProperties#getDeleteCookies()
     */
    BooleanValue deleteCookies() default BooleanValue.DEFAULT;

    /**
     * baseUrl property.
     *
     * @return baseUrl
     * @see ConfigurationProperties#getBaseUrl()
     */
    String baseUrl() default "";

    /**
     * pageLoadTimeout property.
     *
     * @return pageLoadTimeout
     * @see ConfigurationProperties#getPageLoadTimeout()
     */
    long pageLoadTimeout() default -1;

    /**
     * implicitlyWait property.
     *
     * @return implicitlyWait
     * @see ConfigurationProperties#getImplicitlyWait()
     */
    long implicitlyWait() default -1;

    /**
     * scriptTimeout property.
     *
     * @return scriptTimeout
     * @see ConfigurationProperties#getScriptTimeout()
     */
    long scriptTimeout() default -1;

    /**
     * awaitAtMost property.
     *
     * @return awaitAtMost
     * @see ConfigurationProperties#getAwaitAtMost()
     */
    long awaitAtMost() default -1;

    /**
     * awaitPollingEvery property.
     *
     * @return awaitPollingEvery
     * @see ConfigurationProperties#getAwaitPollingEvery() ()
     */
    long awaitPollingEvery() default -1;

    /**
     * eventsEnabled property.
     *
     * @return eventsEnabled
     * @see ConfigurationProperties#getEventsEnabled()
     */
    BooleanValue eventsEnabled() default BooleanValue.DEFAULT;

    /**
     * screenshotPath property.
     *
     * @return screenshotPath
     * @see ConfigurationProperties#getScreenshotPath()
     */
    String screenshotPath() default "";

    /**
     * htmlDumpPath property.
     *
     * @return htmlDumpPath
     * @see ConfigurationProperties#getHtmlDumpPath()
     */
    String htmlDumpPath() default "";

    /**
     * screenshotMode property.
     *
     * @return screenshotMode
     * @see ConfigurationProperties#getScreenshotMode()
     */
    ConfigurationProperties.TriggerMode screenshotMode() default ConfigurationProperties.TriggerMode.DEFAULT;

    /**
     * htmlDumpMode property.
     *
     * @return htmlDumpMode
     * @see ConfigurationProperties#getHtmlDumpMode()
     */
    ConfigurationProperties.TriggerMode htmlDumpMode() default ConfigurationProperties.TriggerMode.DEFAULT;

    /**
     * Custom properties.
     *
     * @return array of CustomProperty annotations
     * @see ConfigurationProperties#getCustomProperty(String)
     */
    CustomProperty[] custom() default {};
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy