Package io.fluentlenium.core.inject
Class InjectionElementLocator
java.lang.Object
io.fluentlenium.core.inject.InjectionElementLocator
- All Implemented Interfaces:
FluentLabelProvider,org.openqa.selenium.support.pagefactory.ElementLocator
public class InjectionElementLocator
extends Object
implements org.openqa.selenium.support.pagefactory.ElementLocator, FluentLabelProvider
The injection element locator, which will lazily locate an element or an element list on a page. This class is
designed for use with the
PageFactory and understands the
annotations FindBy and CacheLookup.-
Constructor Summary
ConstructorsConstructorDescriptionInjectionElementLocator(org.openqa.selenium.SearchContext searchContext, InjectionAnnotations annotations, boolean isFirst) Use this constructor in order to process custom annotaions. -
Method Summary
-
Constructor Details
-
InjectionElementLocator
public InjectionElementLocator(org.openqa.selenium.SearchContext searchContext, InjectionAnnotations annotations, boolean isFirst) Use this constructor in order to process custom annotaions.- Parameters:
searchContext- The context to use when finding the elementannotations- InjectionAnnotations class implementationisFirst- Is this locator used to retrieve list or single element.
-
-
Method Details
-
findElement
public org.openqa.selenium.WebElement findElement()Find the element.- Specified by:
findElementin interfaceorg.openqa.selenium.support.pagefactory.ElementLocator- Returns:
- then found element
-
findElements
Find the element list.- Specified by:
findElementsin interfaceorg.openqa.selenium.support.pagefactory.ElementLocator- Returns:
- list of found elements
-
toString
-
getLabel
Description copied from interface:FluentLabelProviderGet defined definition.- Specified by:
getLabelin interfaceFluentLabelProvider- Returns:
- defined label
-
getLabelHints
Description copied from interface:FluentLabelProviderGet defined label hints.- Specified by:
getLabelHintsin interfaceFluentLabelProvider- Returns:
- array of label hints
-