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

org.jboss.arquillian.graphene.spi.findby.ImplementsLocationStrategy Maven / Gradle / Ivy

There is a newer version: 3.0.0-alpha.4
Show newest version
package org.jboss.arquillian.graphene.spi.findby;

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

import org.openqa.selenium.By;
import org.openqa.selenium.support.FindBy;

/**
 * 

Enables to introduce new annotations of {@link FindBy} type with its own location strategy.

* *

E.g.: framework specific location strategies, extended grammars for well-known strategies, etc.

* *

Usage:

* *
 * @Retention(RetentionPolicy.RUNTIME)
 * @Target(ElementType.FIELD)
 * @ImplementsLocationStrategy(by = XYZLocationStrategy.class)
 * public @interface FindByXYZ {
 *     String value();
 * }
 * 
* *
 * public static class XYZLocationStrategy implements {@link LocationStrategy} {
 *     public {@link By} fromAnnotation({@link Annotation} annotation) {
 *         return ...;
 *     }
 * }
 * 
* * @author Lukas Fryc * * @see LocationStrategy */ @Retention(RetentionPolicy.RUNTIME) @Target(ElementType.ANNOTATION_TYPE) public @interface ImplementsLocationStrategy { Class value(); }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy