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

info.novatec.testit.webtester.junit.annotations.CreateUsing Maven / Gradle / Ivy

There is a newer version: 1.2.0
Show newest version
package info.novatec.testit.webtester.junit.annotations;

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

import info.novatec.testit.webtester.api.browser.Browser;
import info.novatec.testit.webtester.api.browser.BrowserFactory;
import info.novatec.testit.webtester.api.browser.ProxyConfiguration;
import info.novatec.testit.webtester.browser.NoProxyConfiguration;
import info.novatec.testit.webtester.junit.runner.WebTesterJUnitRunner;


/**
 * This annotation can be applied to a {@link Browser browser} field and will
 * instruct the {@link WebTesterJUnitRunner WebTester JUnit runner} to create
 * the browser using the given {@link BrowserFactory factory} class. This is
 * done by calling the factory's {@link BrowserFactory#createBrowser()
 * createBrowser()} method.
 *
 * @see WebTesterJUnitRunner
 * @since 0.9.2
 */
@Retention(RetentionPolicy.RUNTIME)
@Target({ ElementType.FIELD })
public @interface CreateUsing {

    /**
     * The {@link BrowserFactory factory} to use when initializing the annotated
     * {@link Browser browser} field.
     *
     * @return the factory to use
     * @since 0.9.2
     */
    Class value();

    /**
     * The {@link ProxyConfiguration proxy configuration} to use when
     * initializing the annotated {@link Browser browser} field.
     *
     * @return the proxy configuration to use
     * @since 0.9.7
     */
    Class proxy() default NoProxyConfiguration.class;

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy