public class WiseDecorator extends Object
| Constructor and Description |
|---|
WiseDecorator(org.openqa.selenium.support.pagefactory.ElementLocatorFactory factory) |
| Modifier and Type | Method and Description |
|---|---|
<E> List<E> |
decorate(Class<E> clazz,
List<org.openqa.selenium.WebElement> webElements)
Decides how to decorate the list of webElements.
|
<E> E |
decorate(Class<E> clazz,
org.openqa.selenium.WebElement webElement)
Decides how to decorate the webElement.
|
Object |
decorate(ClassLoader loader,
Field field) |
static <E> E |
decorateElement(Class<E> clazz,
org.openqa.selenium.WebElement webElement)
Decorates a webElement.
|
static <E> List<E> |
decorateElements(Class<E> clazz,
List<org.openqa.selenium.WebElement> webElements)
Decorates a list of webElements.
|
public WiseDecorator(org.openqa.selenium.support.pagefactory.ElementLocatorFactory factory)
factory - The factory of the locator of the elements.public static <E> E decorateElement(Class<E> clazz, org.openqa.selenium.WebElement webElement)
E - The type of the decorated element.clazz - The class of the decorated element. Must be either WebElement or a type
annotated with Field, Container or Frame. Will lookup for its implementation class following
ClasspathUtil.findImplementationClass(Class) rules.webElement - The webElement that will be decorated.public static <E> List<E> decorateElements(Class<E> clazz, List<org.openqa.selenium.WebElement> webElements)
E - The type of the decorated elements.clazz - The class of the decorated elements. Must be either WebElement or a type
annotated with Field, Container or Frame. Will lookup for its implementation class following
ClasspathUtil.findImplementationClass(Class) rules.webElements - The webElements that will be decorated.public <E> List<E> decorate(Class<E> clazz, List<org.openqa.selenium.WebElement> webElements)
E - The class type.clazz - The class that will decorate each webElement of the list. If the class is not
concrete, will lookup for its implementation matching the pattern
classPackage.{impl}.className{Impl} yet. A more sofisticated search is planned to be
implemented on the future.webElements - The list of webElements that may be decorated.public <E> E decorate(Class<E> clazz, org.openqa.selenium.WebElement webElement)
E - The class type.clazz - The class that will decorate the webElement. If the class is not concrete, will
lookup for its implementation matching the pattern classPackage.{impl}.className{Impl} yet. A
more sofisticated search is planned to be implemented on the future.webElement - The webElement that may be decorated.public Object decorate(ClassLoader loader, Field field)
Copyright © 2013. All Rights Reserved.