public class FluentDriver extends java.lang.Object implements FluentControl
ConfigurationProperties.DriverLifecycle, ConfigurationProperties.TriggerMode| Constructor and Description |
|---|
FluentDriver(org.openqa.selenium.WebDriver driver,
Configuration configuration,
FluentControl adapter)
Wrap the driver into a Fluent driver.
|
| Modifier and Type | Method and Description |
|---|---|
FluentList<FluentWebElement> |
$(org.openqa.selenium.By locator,
SearchFilter... filters)
Find list of elements with Selenium locator and filters.
|
FluentList<FluentWebElement> |
$(java.util.List<org.openqa.selenium.WebElement> rawElements)
Wrap raw selenium elements into a list of elements.
|
FluentList<FluentWebElement> |
$(SearchFilter... filters)
Find list of elements with filters.
|
FluentList<FluentWebElement> |
$(java.lang.String selector,
SearchFilter... filters)
Find list of elements with CSS selector and filters.
|
Alert |
alert()
Get an object to control the alert window.
|
FluentWait |
await()
wait for an asynchronous call
|
boolean |
canTakeScreenShot()
Check if underlying
WebDriver can take screenshot. |
org.openqa.selenium.Capabilities |
capabilities()
Get the actual capabilities of the underlying Selenium WebDriver.
|
FluentWebElement |
el(org.openqa.selenium.By locator,
SearchFilter... filters)
Find first element with Selenium locator and filters.
|
FluentWebElement |
el(SearchFilter... filters)
Find first element with filters.
|
FluentWebElement |
el(java.lang.String selector,
SearchFilter... filters)
Find first element with CSS selector and filters.
|
FluentWebElement |
el(org.openqa.selenium.WebElement rawElement)
Wrap existing raw selenium element into an element.
|
EventsRegistry |
events()
Retrieves an event registry to register event listeners.
|
FluentJavascript |
executeAsyncScript(java.lang.String script,
java.lang.Object... args)
Execute a script, asynchronously.
|
FluentJavascript |
executeScript(java.lang.String script,
java.lang.Object... args)
Execute a script, synchronously.
|
FluentList<FluentWebElement> |
find(org.openqa.selenium.By locator,
SearchFilter... filters)
Find list of elements with Selenium locator and filters.
|
FluentList<FluentWebElement> |
find(java.util.List<org.openqa.selenium.WebElement> rawElements)
Wrap raw selenium elements into a list of elements.
|
FluentList<FluentWebElement> |
find(SearchFilter... filters)
Find list of elements with filters.
|
FluentList<FluentWebElement> |
find(java.lang.String selector,
SearchFilter... filters)
Find list of elements with CSS selector and filters.
|
org.openqa.selenium.Cookie |
getCookie(java.lang.String name)
return the corresponding cookie given a name
|
java.util.Set<org.openqa.selenium.Cookie> |
getCookies()
return the cookies as a set
|
org.openqa.selenium.WebDriver |
getDriver()
Get the actual underlying Selenium WebDriver.
|
<P extends FluentPage> |
goTo(P page)
Open the page, using the url defined in the page
|
void |
goTo(java.lang.String url)
Open the url page
|
void |
goToInNewTab(java.lang.String url)
Open the url page in a new tab
|
KeyboardActions |
keyboard()
Execute keyboard actions
|
MouseActions |
mouse()
Execute mouse actions
|
java.lang.String |
pageSource()
Return the source of the page
|
void |
quit()
Quit the underlying web driver and release fluent driver resources.
|
void |
releaseFluent()
Release fluent driver resources.
|
void |
switchTo()
Switch to the default element
|
void |
switchTo(FluentList<? extends FluentWebElement> elements)
Switch to the first selected Element (if element is null or not an iframe, or haven't an id then
switch to the default)
|
void |
switchTo(FluentWebElement element)
Switch to the selected Element (if element is null or not an iframe, or haven't an id then
switch to the default)
|
void |
switchToDefault()
Switch to the default element
|
void |
takeHtmlDump()
Take a html dump of the browser DOM.
|
void |
takeHtmlDump(java.lang.String fileName)
Take a html dump of the browser DOM into a file given by the fileName param.
|
void |
takeScreenshot()
Take a snapshot of the browser.
|
void |
takeScreenshot(java.lang.String fileName)
Take a snapshot of the browser into a file given by the fileName param.
|
java.lang.String |
url()
Return the url of the page.
|
WindowAction |
window()
Exposes methods on browser window
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitcssinject, injectComponent, newInstanceasComponentList, asComponentList, asComponentList, asComponentList, asComponentList, asComponentList, asFluentList, asFluentList, asFluentList, asFluentList, asFluentList, asFluentList, isComponentClass, isComponentListClass, newComponent, newComponentList, newComponentList, newComponentList, newComponentList, newComponentList, newComponentList, newFluent, newFluentList, newFluentList, newFluentList, newFluentList, newFluentList, newFluentListgetAwaitAtMost, getAwaitPollingEvery, getBaseUrl, getBrowserTimeout, getBrowserTimeoutRetries, getCapabilities, getConfigurationDefaults, getConfigurationFactory, getCustomProperty, getDeleteCookies, getDriverLifecycle, getEventsEnabled, getHtmlDumpMode, getHtmlDumpPath, getImplicitlyWait, getPageLoadTimeout, getRemoteUrl, getScreenshotMode, getScreenshotPath, getScriptTimeout, getWebDriversetAwaitAtMost, setAwaitPollingEvery, setBaseUrl, setBrowserTimeout, setBrowserTimeoutRetries, setCapabilities, setConfigurationFactory, setCustomProperty, setDeleteCookies, setDriverLifecycle, setEventsEnabled, setHtmlDumpMode, setHtmlDumpPath, setImplicitlyWait, setPageLoadTimeout, setRemoteUrl, setScreenshotMode, setScreenshotPath, setScriptTimeout, setWebDriverpublic FluentDriver(org.openqa.selenium.WebDriver driver,
Configuration configuration,
FluentControl adapter)
driver - underlying selenium driverconfiguration - configurationadapter - adapter fluent control interfacepublic void takeHtmlDump()
SnapshotControltakeHtmlDump in interface SnapshotControlpublic void takeHtmlDump(java.lang.String fileName)
SnapshotControltakeHtmlDump in interface SnapshotControlfileName - file name for html dumppublic boolean canTakeScreenShot()
SnapshotControlWebDriver can take screenshot.canTakeScreenShot in interface SnapshotControlpublic void takeScreenshot()
SnapshotControltakeScreenshot in interface SnapshotControlpublic void takeScreenshot(java.lang.String fileName)
SnapshotControltakeScreenshot in interface SnapshotControlfileName - file name for screenshotpublic org.openqa.selenium.WebDriver getDriver()
SeleniumDriverControl
To customize the WebDriver, you should configure ConfigurationProperties.getWebDriver()
or override FluentAdapter.newWebDriver().
This method can't be override to customize the WebDriver.
getDriver in interface SeleniumDriverControlpublic EventsRegistry events()
EventsControlevents in interface EventsControlpublic MouseActions mouse()
InputControlmouse in interface InputControlpublic KeyboardActions keyboard()
InputControlkeyboard in interface InputControlpublic WindowAction window()
NavigationControlwindow in interface NavigationControlpublic FluentWait await()
AwaitControlawait in interface AwaitControlpublic java.util.Set<org.openqa.selenium.Cookie> getCookies()
NavigationControlgetCookies in interface NavigationControlpublic org.openqa.selenium.Cookie getCookie(java.lang.String name)
NavigationControlgetCookie in interface NavigationControlname - cookie namepublic java.lang.String url()
NavigationControlurl in interface NavigationControlpublic java.lang.String pageSource()
NavigationControlpageSource in interface NavigationControlpublic <P extends FluentPage> P goTo(P page)
NavigationControlgoTo in interface NavigationControlP - Type of FluentPagepage - page to openFluentPage.getUrl()public void goTo(java.lang.String url)
NavigationControlgoTo in interface NavigationControlurl - page URL to visitpublic void goToInNewTab(java.lang.String url)
NavigationControlgoToInNewTab in interface NavigationControlurl - the url of the page topublic org.openqa.selenium.Capabilities capabilities()
CapabilitiesControlcapabilities in interface CapabilitiesControlHasCapabilities.getCapabilities()public FluentJavascript executeScript(java.lang.String script, java.lang.Object... args)
JavascriptControlexecuteScript in interface JavascriptControlscript - script source to executeargs - script argumentspublic FluentJavascript executeAsyncScript(java.lang.String script, java.lang.Object... args)
JavascriptControlexecuteAsyncScript in interface JavascriptControlscript - script source to executeargs - script argumentspublic FluentList<FluentWebElement> $(java.lang.String selector, SearchFilter... filters)
SearchControl$ in interface SearchControl<FluentWebElement>selector - CSS selectorfilters - set of filterspublic FluentWebElement el(java.lang.String selector, SearchFilter... filters)
SearchControlel in interface SearchControl<FluentWebElement>selector - CSS selectorfilters - set of filterspublic FluentList<FluentWebElement> $(SearchFilter... filters)
SearchControl$ in interface SearchControl<FluentWebElement>filters - set of filters in the current contextpublic FluentWebElement el(SearchFilter... filters)
SearchControlel in interface SearchControl<FluentWebElement>filters - set of filters in the current contextpublic FluentList<FluentWebElement> $(org.openqa.selenium.By locator, SearchFilter... filters)
SearchControl$ in interface SearchControl<FluentWebElement>locator - elements locatorfilters - filters setpublic FluentWebElement el(org.openqa.selenium.By locator, SearchFilter... filters)
SearchControlel in interface SearchControl<FluentWebElement>locator - elements locatorfilters - filters setpublic FluentList<FluentWebElement> find(java.lang.String selector, SearchFilter... filters)
SearchControlfind in interface SearchControl<FluentWebElement>selector - CSS selectorfilters - set of filterspublic FluentList<FluentWebElement> find(org.openqa.selenium.By locator, SearchFilter... filters)
SearchControlfind in interface SearchControl<FluentWebElement>locator - elements locatorfilters - filters setpublic FluentList<FluentWebElement> find(SearchFilter... filters)
SearchControlfind in interface SearchControl<FluentWebElement>filters - set of filters in the current contextpublic FluentList<FluentWebElement> find(java.util.List<org.openqa.selenium.WebElement> rawElements)
SearchControlfind in interface SearchControl<FluentWebElement>rawElements - raw selenium elementspublic FluentList<FluentWebElement> $(java.util.List<org.openqa.selenium.WebElement> rawElements)
SearchControl$ in interface SearchControl<FluentWebElement>rawElements - raw selenium elementspublic FluentWebElement el(org.openqa.selenium.WebElement rawElement)
SearchControlel in interface SearchControl<FluentWebElement>rawElement - raw selenium elementpublic void switchTo(FluentList<? extends FluentWebElement> elements)
NavigationControlswitchTo in interface NavigationControlelements - fluent web elementpublic void switchTo(FluentWebElement element)
NavigationControlswitchTo in interface NavigationControlelement - fluent web elementpublic void switchTo()
NavigationControlswitchTo in interface NavigationControlpublic void switchToDefault()
NavigationControlswitchToDefault in interface NavigationControlpublic Alert alert()
AlertControlalert in interface AlertControlpublic void quit()
public void releaseFluent()
Copyright © 2018 FluentLenium. All Rights Reserved.