Example usage for org.openqa.selenium.support.pagefactory AbstractAnnotations buildBy

List of usage examples for org.openqa.selenium.support.pagefactory AbstractAnnotations buildBy

Introduction

In this page you can find the example usage for org.openqa.selenium.support.pagefactory AbstractAnnotations buildBy.

Prototype

public abstract By buildBy();

Source Link

Document

Defines how to transform given object (field, class, etc) into org.openqa.selenium.By class used by webdriver to locate elements.

Usage

From source file:com.common.seleniumlib.CustomElementLocator.java

License:Apache License

/**
* Use this constructor in order to process custom annotaions.
*
* @param searchContext The context to use when finding the element
* @param annotations AbstractAnnotations class implementation
*//*from  w  w w.  j  ava2 s.  c o  m*/
public CustomElementLocator(SearchContext searchContext, AbstractAnnotations annotations) {
    this.searchContext = searchContext;
    this.shouldCache = annotations.isLookupCached();
    this.by = annotations.buildBy();
}