public class TestBrowser
extends org.fluentlenium.adapter.FluentAdapter
Constructor and Description |
---|
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).
|
Modifier and Type | Method and Description |
---|---|
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
|
<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)
|
$, $, $, $, alert, asComponentList, asComponentList, asComponentList, asComponentList, asComponentList, asComponentList, asFluentList, asFluentList, asFluentList, asFluentList, asFluentList, asFluentList, await, canTakeScreenShot, capabilities, css, el, el, el, el, events, executeAsyncScript, executeScript, find, find, find, find, getAwaitAtMost, getAwaitPollingEvery, getBaseUrl, getBrowserTimeout, getBrowserTimeoutRetries, getCapabilities, getConfiguration, getConfigurationDefaults, getConfigurationFactory, getControlContainer, getCookie, getCookies, getCustomProperty, getDeleteCookies, getDriver, getDriverLifecycle, getEventsEnabled, getHtmlDumpMode, getHtmlDumpPath, getImplicitlyWait, getPageLoadTimeout, getRemoteUrl, getScreenshotMode, getScreenshotPath, getScriptTimeout, getWebDriver, goTo, goTo, goToInNewTab, initFluent, inject, injectComponent, isComponentClass, isComponentListClass, keyboard, mouse, newComponent, newComponentList, newComponentList, newComponentList, newComponentList, newComponentList, newComponentList, newFluent, newFluentList, newFluentList, newFluentList, newFluentList, newFluentList, newFluentList, newInstance, newWebDriver, pageSource, releaseFluent, setAwaitAtMost, setAwaitPollingEvery, setBaseUrl, setBrowserTimeout, setBrowserTimeoutRetries, setCapabilities, setConfigurationFactory, setCustomProperty, setDeleteCookies, setDriverLifecycle, setEventsEnabled, setHtmlDumpMode, setHtmlDumpPath, setImplicitlyWait, setPageLoadTimeout, setRemoteUrl, setScreenshotMode, setScreenshotPath, setScriptTimeout, setWebDriver, switchTo, switchTo, switchTo, switchToDefault, takeHtmlDump, takeHtmlDump, takeScreenShot, takeScreenShot, url, window
public TestBrowser(java.lang.Class<? extends org.openqa.selenium.WebDriver> webDriver, java.lang.String baseUrl) throws java.lang.Exception
webDriver
- The WebDriver instance to use.baseUrl
- The base url to use for relative requests.java.lang.Exception
- if the webdriver cannot be created.public TestBrowser(org.openqa.selenium.WebDriver webDriver, java.lang.String baseUrl)
webDriver
- The WebDriver instance to use.baseUrl
- The base url to use for relative requests.public org.openqa.selenium.support.ui.FluentWait<org.openqa.selenium.WebDriver> fluentWait()
FluentWait<WebDriver>
instance using the underlying web driver.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)
Useful in situations where FluentAdapter#await is too specific (for example to check against page source)
T
- the return typewait
- generic FluentWait<WebDriver>
instancef
- function to executepublic <T> T waitUntil(com.google.common.base.Function<org.openqa.selenium.WebDriver,T> f)
T
- the return typef
- function to executepublic org.openqa.selenium.WebDriver.Options manage()