public final class PageObjectsInjector extends Object
| Modifier and Type | Method and Description |
|---|---|
static ElementGroup |
createDefaultInstance(Class<?> elementGroupType)
Creates an instance using the default constructor
|
static void |
injectFields(ElementGroup group)
Injects WebElement suppliers in all fields according to the
Locator annotation on that
field |
static void |
injectMethods(ElementGroup group)
Injects WebElement suppliers in all setter methods according to the
Locator annotation on
that method |
static void |
injectWebElement(ElementGroup target,
Field field,
Locator locator)
Injects a WebElement supplier into the specified field of the target.
|
static void |
invokeSetter(Method m,
ElementGroup target,
Locator loc)
Invokes the specified setter method to inject a WebElement supplier
|
public static void injectMethods(ElementGroup group)
Locator annotation on
that methodgroup - the page into which setter methods should be invokedpublic static void invokeSetter(Method m, ElementGroup target, Locator loc)
m - the setter method to invoketarget - the target element on which to invoke the method and which acts a search context for locating the
elementsloc - the locator to locate the web elementpublic static void injectFields(ElementGroup group)
Locator annotation on that
fieldgroup - the page into which fields should be injectedpublic static void injectWebElement(ElementGroup target, Field field, Locator locator)
target - the target object into which the webelement supplier should be injectedfield - the field declaration into which the instance should be injectedlocator - the locator declaring how the web element should be locatedpublic static ElementGroup createDefaultInstance(Class<?> elementGroupType)
elementGroupType - the type of the element group to instantiateCopyright © 2016 DevCon5 GmbH. All rights reserved.