play.test
Class TestBrowser

java.lang.Object
  extended by org.fluentlenium.core.Fluent
      extended by org.fluentlenium.core.FluentAdapter
          extended by play.test.TestBrowser
All Implemented Interfaces:
org.fluentlenium.core.search.SearchActions

public class TestBrowser
extends org.fluentlenium.core.FluentAdapter

A test browser (Using Selenium WebDriver) with the FluentLenium API (https://github.com/Fluentlenium/FluentLenium).


Constructor Summary
TestBrowser(java.lang.Class<? extends org.openqa.selenium.WebDriver> webDriver, java.lang.String baseUrl)
          A test browser (Using Selenium WebDriver) with the FluentLenium API (https://github.com/Fluentlenium/FluentLenium).
TestBrowser(org.openqa.selenium.WebDriver webDriver, java.lang.String baseUrl)
          A test browser (Using Selenium WebDriver) with the FluentLenium API (https://github.com/Fluentlenium/FluentLenium).
 
Method Summary
 org.openqa.selenium.support.ui.FluentWait<org.openqa.selenium.WebDriver> fluentWait()
          Creates a generic FluentWait<WebDriver> instance using the underlying web driver
 org.openqa.selenium.WebDriver.Options manage()
          retrieves the underlying option interface that can be used to set cookies, manage timeouts among other things
<T> T
waitUntil(org.openqa.selenium.support.ui.FluentWait<org.openqa.selenium.WebDriver> wait, com.google.common.base.Function<org.openqa.selenium.WebDriver,T> f)
          Repeatedly applies this instance's input value to the given function until one of the following occurs: the function returns neither null nor false, the function throws an unignored exception, the timeout expires Useful in situations where FluentAdapter#await is too specific (for example to check against page source)
<T> T
waitUntil(com.google.common.base.Function<org.openqa.selenium.WebDriver,T> f)
          Repeatedly applies this instance's input value to the given function until one of the following occurs: the function returns neither null nor false, the function throws an unignored exception, the default timeout expires useful in situations where FluentAdapter#await is too specific (for example to check against page source or title)
 
Methods inherited from class org.fluentlenium.core.FluentAdapter
assertAt, createPage, getDefaultBaseUrl, getDefaultConfig, getDefaultDriver, initClass, initTest, quit
 
Methods inherited from class org.fluentlenium.core.Fluent
$, $, await, clear, clear, clear, click, click, executeScript, fill, fill, find, find, findFirst, getBaseUrl, getCookie, getCookies, getDriver, goTo, goTo, initFluent, pageSource, submit, submit, takeScreenShot, takeScreenShot, text, title, url, value, withDefaultPageWait, withDefaultSearchWait, withDefaultUrl
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TestBrowser

public TestBrowser(java.lang.Class<? extends org.openqa.selenium.WebDriver> webDriver,
                   java.lang.String baseUrl)
            throws java.lang.Exception
A test browser (Using Selenium WebDriver) with the FluentLenium API (https://github.com/Fluentlenium/FluentLenium).

Parameters:
webDriver - The WebDriver instance to use.
baseUrl - The base url to use for relative requests.
Throws:
java.lang.Exception

TestBrowser

public TestBrowser(org.openqa.selenium.WebDriver webDriver,
                   java.lang.String baseUrl)
A test browser (Using Selenium WebDriver) with the FluentLenium API (https://github.com/Fluentlenium/FluentLenium).

Parameters:
webDriver - The WebDriver instance to use.
baseUrl - The base url to use for relative requests.
Method Detail

fluentWait

public org.openqa.selenium.support.ui.FluentWait<org.openqa.selenium.WebDriver> fluentWait()
Creates a generic FluentWait<WebDriver> instance using the underlying web driver


waitUntil

public <T> T waitUntil(org.openqa.selenium.support.ui.FluentWait<org.openqa.selenium.WebDriver> wait,
                       com.google.common.base.Function<org.openqa.selenium.WebDriver,T> f)
Repeatedly applies this instance's input value to the given function until one of the following occurs: the function returns neither null nor false, the function throws an unignored exception, the timeout expires Useful in situations where FluentAdapter#await is too specific (for example to check against page source)

Parameters:
wait - generic FluentWait<WebDriver> instance
f - function to execute

waitUntil

public <T> T waitUntil(com.google.common.base.Function<org.openqa.selenium.WebDriver,T> f)
Repeatedly applies this instance's input value to the given function until one of the following occurs: the function returns neither null nor false, the function throws an unignored exception, the default timeout expires useful in situations where FluentAdapter#await is too specific (for example to check against page source or title)

Parameters:
f - function to execute

manage

public org.openqa.selenium.WebDriver.Options manage()
retrieves the underlying option interface that can be used to set cookies, manage timeouts among other things