// Path: src/main/java/me/alb_i986/selenium/tinafw/ui/BaseWebPage.java
// public abstract class BaseWebPage implements WebPage {
// 
// 	protected static final Logger logger = LogManager.getLogger(WebPage.class);
// 
// 	protected WebDriver driver;
// 	protected WebPage previousPage;
// 	
// 	/**
// 	 * Calls {@link PageFactory#initElements(WebDriver, Object)}
// 	 * and {@link #waitUntilIsLoaded()}.
// 	 * 
// 	 * @param driver
// 	 * @param previous
// 	 */
// 	public BaseWebPage(WebDriver driver, WebPage previous) {
// 		this.driver = driver;
// 		this.previousPage = previous;
// 		PageFactory.initElements(driver, this);
// 		logger.info("Loading page " + getClass().getSimpleName());
// 		waitUntilIsLoaded();
// 	}
// 	
// 
// 	/**
// 	 * @see WebDriver#getTitle()
// 	 */
// 	@Override
// 	public String getTitle() {
// 		return driver.getTitle();
// 	}
// 
// 	/**
// 	 * @see WebDriver#getCurrentUrl()
// 	 */
// 	@Override
// 	public String getCurrentUrl() {
// 		return driver.getCurrentUrl();
// 	}
// 
// 	/**
// 	 * @param locator
// 	 * @return {@link WebElement}
// 	 * 
// 	 * @see WebDriver#findElement(By)
// 	 */
// 	protected WebElement getElement(By locator) {
// 		return driver.findElement(locator);
// 	}
// 
// 	/**
// 	 * @param locator
// 	 * @return list of {@link WebElement}s
// 	 * 
// 	 * @see WebDriver#findElements(By)
// 	 */
// 	protected List<WebElement> getElements(By locator) {
// 		return driver.findElements(locator);
// 	}
// 
// 	/**
// 	 * Dumb wait until the HTML body element is visible.
// 	 * Actually this method should be abstract,
// 	 * but it isn't just for convenience.
// 	 * It is highly recommended to override it.
// 	 * Or you may just override {@link #getIdentifyingLocator()}.
// 	 */
// 	protected void waitUntilIsLoaded() {
// 		PageHelper.waitUntil(
// 			ExpectedConditions.visibilityOfElementLocated(getIdentifyingLocator()),
// 			driver
// 		);
// 	}
// 
// 	protected By getIdentifyingLocator() {
// 		return By.tagName("body");
// 	}
// 	
// }
// 
// Path: src/main/java/me/alb_i986/selenium/tinafw/ui/WebPage.java
// public interface WebPage {
// 
// 	/**
// 	 * @see Config#getBaseUrl()
// 	 */
// 	public final static String BASE_URL = Config.getBaseUrl();
// 	
// 
// 	/**
// 	 * @see WebDriver#getTitle()
// 	 */
// 	public String getTitle();
// 
// 	/**
// 	 * @see WebDriver#getCurrentUrl()
// 	 */
// 	public String getCurrentUrl();
// 
// }


import org.openqa.selenium.By;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.WebElement;
import me.alb_i986.selenium.tinafw.ui.BaseWebPage;
import me.alb_i986.selenium.tinafw.ui.WebPage;
package me.alb_i986.selenium.tinafw.sample.ui;



/**
 * Models a single box in the {@link SearchResultsPage},
 * representing a single search result,
 * corresponding to an about.me profile.
 *
 */
public class SearchResult extends BaseWebPage {

	private static final By NAME_LOCATOR = By.cssSelector(".thumb_description a");
	private static final By COMPLIMENT_LOCATOR = By.cssSelector(".action.compliment");
	
	private WebElement root;

// Path: src/main/java/me/alb_i986/selenium/tinafw/ui/BaseWebPage.java
// public abstract class BaseWebPage implements WebPage {
// 
// 	protected static final Logger logger = LogManager.getLogger(WebPage.class);
// 
// 	protected WebDriver driver;
// 	protected WebPage previousPage;
// 	
// 	/**
// 	 * Calls {@link PageFactory#initElements(WebDriver, Object)}
// 	 * and {@link #waitUntilIsLoaded()}.
// 	 * 
// 	 * @param driver
// 	 * @param previous
// 	 */
// 	public BaseWebPage(WebDriver driver, WebPage previous) {
// 		this.driver = driver;
// 		this.previousPage = previous;
// 		PageFactory.initElements(driver, this);
// 		logger.info("Loading page " + getClass().getSimpleName());
// 		waitUntilIsLoaded();
// 	}
// 	
// 
// 	/**
// 	 * @see WebDriver#getTitle()
// 	 */
// 	@Override
// 	public String getTitle() {
// 		return driver.getTitle();
// 	}
// 
// 	/**
// 	 * @see WebDriver#getCurrentUrl()
// 	 */
// 	@Override
// 	public String getCurrentUrl() {
// 		return driver.getCurrentUrl();
// 	}
// 
// 	/**
// 	 * @param locator
// 	 * @return {@link WebElement}
// 	 * 
// 	 * @see WebDriver#findElement(By)
// 	 */
// 	protected WebElement getElement(By locator) {
// 		return driver.findElement(locator);
// 	}
// 
// 	/**
// 	 * @param locator
// 	 * @return list of {@link WebElement}s
// 	 * 
// 	 * @see WebDriver#findElements(By)
// 	 */
// 	protected List<WebElement> getElements(By locator) {
// 		return driver.findElements(locator);
// 	}
// 
// 	/**
// 	 * Dumb wait until the HTML body element is visible.
// 	 * Actually this method should be abstract,
// 	 * but it isn't just for convenience.
// 	 * It is highly recommended to override it.
// 	 * Or you may just override {@link #getIdentifyingLocator()}.
// 	 */
// 	protected void waitUntilIsLoaded() {
// 		PageHelper.waitUntil(
// 			ExpectedConditions.visibilityOfElementLocated(getIdentifyingLocator()),
// 			driver
// 		);
// 	}
// 
// 	protected By getIdentifyingLocator() {
// 		return By.tagName("body");
// 	}
// 	
// }
// 
// Path: src/main/java/me/alb_i986/selenium/tinafw/ui/WebPage.java
// public interface WebPage {
// 
// 	/**
// 	 * @see Config#getBaseUrl()
// 	 */
// 	public final static String BASE_URL = Config.getBaseUrl();
// 	
// 
// 	/**
// 	 * @see WebDriver#getTitle()
// 	 */
// 	public String getTitle();
// 
// 	/**
// 	 * @see WebDriver#getCurrentUrl()
// 	 */
// 	public String getCurrentUrl();
// 
// }


// Path: src/main/java/me/alb_i986/selenium/tinafw/sample/ui/SearchResult.java
import org.openqa.selenium.By;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.WebElement;
import me.alb_i986.selenium.tinafw.ui.BaseWebPage;
import me.alb_i986.selenium.tinafw.ui.WebPage;

package me.alb_i986.selenium.tinafw.sample.ui;



/**
 * Models a single box in the {@link SearchResultsPage},
 * representing a single search result,
 * corresponding to an about.me profile.
 *
 */
public class SearchResult extends BaseWebPage {

	private static final By NAME_LOCATOR = By.cssSelector(".thumb_description a");
	private static final By COMPLIMENT_LOCATOR = By.cssSelector(".action.compliment");
	
	private WebElement root;

	public SearchResult(WebElement root, WebDriver driver, WebPage previous) {