com.github.hemanthsridhar.pagefactory.AbstractCustomFindByBuilder Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of custom-page-factory Show documentation
Show all versions of custom-page-factory Show documentation
Custom Page Factory to read web elements or mobile elements from JSON
package com.github.hemanthsridhar.pagefactory;
import com.github.hemanthsridhar.support.SearchBy;
import org.openqa.selenium.By;
import java.lang.reflect.Field;
/**
* Created by hemanthsridhar on 1/6/19.
*/
public abstract class AbstractCustomFindByBuilder {
public abstract By buildIt(Object annotation, Field field);
protected By buildByFromFindBy(SearchBy findBy) {
return this.buildByFromShortFindBy(findBy);
}
protected By buildByFromShortFindBy(SearchBy findBy) {
SearchWithJSONProvider searchWithJSON = new SearchWithJSONProvider(findBy.locatorsFile());
return searchWithJSON.getJSONProvider().getLocator(findBy.nameOfTheLocator());
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy