org.openqa.selenium.support.pagefactory
Class DefaultFieldDecorator
java.lang.Object
org.openqa.selenium.support.pagefactory.DefaultFieldDecorator
- All Implemented Interfaces:
- FieldDecorator
public class DefaultFieldDecorator
- extends Object
- implements FieldDecorator
Default decorator for use with PageFactory. Will decorate 1) all of the
WebElement fields and 2) List fields that have @FindBy or
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
factory
protected ElementLocatorFactory factory
DefaultFieldDecorator
public DefaultFieldDecorator(ElementLocatorFactory factory)
decorate
public Object decorate(ClassLoader loader,
Field field)
- Description copied from interface:
FieldDecorator
- This method is called by PageFactory on all fields to decide how to decorate the field.
- Specified by:
decorate in interface FieldDecorator
- Parameters:
loader - The class loader that was used for the page objectfield - The field that may be decorated.
- Returns:
- Value to decorate the field with or null if it shouldn't be decorated. If non-null,
must be assignable to the field.
proxyForLocator
protected WebElement proxyForLocator(ClassLoader loader,
ElementLocator locator)
proxyForListLocator
protected List<WebElement> proxyForListLocator(ClassLoader loader,
ElementLocator locator)
Copyright © 2012. All Rights Reserved.