public class FluentWebElement extends Component implements org.openqa.selenium.internal.WrapsElement, FluentActions<FluentWebElement,FluentWebElement>, FluentProxyState<FluentWebElement>, SearchControl<FluentWebElement>, HookControl<FluentWebElement>, FluentLabel<FluentWebElement>
WebElement. It provides an enhanced API to control selenium element.control, instantiator, webElement| Constructor and Description |
|---|
FluentWebElement(org.openqa.selenium.WebElement element,
FluentControl control,
ComponentInstantiator instantiator)
Creates a new fluent web element.
|
| 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> |
$(SearchFilter... filters)
Find list of elements with filters.
|
FluentList<FluentWebElement> |
$(String selector,
SearchFilter... filters)
Find list of elements with CSS selector and filters.
|
<T> T |
as(Class<T> componentClass)
Wrap all underlying elements in a componen..
|
FluentList<FluentWebElement> |
asList()
Converts this element as a single element list.
|
String |
attribute(String name)
return any value of custom attribute (generated=true will return "true" if attribute("generated") is called.
|
FluentWaitElement |
await()
Build a wait object to wait for a condition of this element.
|
Axes |
axes()
XPath Axes accessor (parent, ancestors, preceding, following, ...).
|
FluentWebElement |
clear()
Clear the element
|
FluentWebElement |
click()
Perform a click.
|
boolean |
clickable()
Check that this element is visible and enabled such that you can click it.
|
FluentConditions |
conditions()
Get a conditions object used to verify condition on this element.
|
FluentWebElement |
contextClick()
Perform a context click.
|
boolean |
displayed()
return true if the element is displayed, other way return false
|
FluentWebElement |
doubleClick()
Perform a double click.
|
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(String selector,
SearchFilter... filters)
Find first element with CSS selector and filters.
|
boolean |
enabled()
return true if the element is enabled, other way return false
|
Fill |
fill()
Construct a Fill Builder in order to allow easy fill of visible input fields.
|
FillSelect |
fillSelect()
Construct a Fill Select Builder in order to allow easy fill of visible input fields.
|
FluentList<FluentWebElement> |
find(org.openqa.selenium.By locator,
SearchFilter... filters)
Find list of elements with Selenium locator and filters.
|
FluentList<FluentWebElement> |
find(SearchFilter... filters)
Find list of elements with filters.
|
FluentList<FluentWebElement> |
find(String selector,
SearchFilter... filters)
Find list of elements with CSS selector and filters.
|
FluentWebElement |
frame()
Select a frame using this element.
|
org.openqa.selenium.WebElement |
getElement()
return the webElement
|
org.openqa.selenium.WebElement |
getWrappedElement() |
String |
html()
Get the HTML of a the element
|
String |
id()
return the id of the elements
|
KeyboardElementActions |
keyboard()
Execute keyboard actions on the element
|
boolean |
loaded()
Check if the element is loaded.
|
MouseElementActions |
mouse()
Execute mouse actions on the element
|
String |
name()
return the name of the element
|
FluentWebElement |
now()
Search for the element now, actually performing the search on the
WebDriver. |
FluentWebElement |
now(boolean force)
Search for the element now, actually performing the search on the
WebDriver. |
com.google.common.base.Optional<FluentWebElement> |
optional()
Builds an optional.
|
boolean |
present()
Check if the element is present in the DOM.
|
FluentWebElement |
reset()
Reset the element.
|
boolean |
selected()
return true if the element is selected, other way false
|
org.openqa.selenium.Dimension |
size()
return the size of the element
|
boolean |
stale()
Check that this element is no longer attached to the DOM.
|
FluentWebElement |
submit()
Submit the element
|
String |
tagName()
return the tag name
|
String |
text()
return the visible text of the element
|
String |
textContent()
return the text content of the element (even invisible through textContent attribute)
|
String |
toString() |
String |
value()
return the value of the elements
|
FluentWebElement |
write(String... text)
Set the text element
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitscrollIntoView, scrollIntoView, scrollToElementnoHook, noHook, noHook, noHook, noHookInstance, noHookInstance, restoreHooks, withHook, withHookwithLabel, withLabelHintpublic FluentWebElement(org.openqa.selenium.WebElement element,
FluentControl control,
ComponentInstantiator instantiator)
element - underlying elementcontrol - controle interfaceinstantiator - component instantiatorpublic FluentWebElement click()
FluentActionsclick in interface FluentActions<FluentWebElement,FluentWebElement>WebElement.click()public FluentWebElement doubleClick()
FluentActionsdoubleClick in interface FluentActions<FluentWebElement,FluentWebElement>public FluentWebElement contextClick()
FluentActionscontextClick in interface FluentActions<FluentWebElement,FluentWebElement>public boolean present()
FluentProxyStatepresent in interface FluentProxyState<FluentWebElement>public FluentWebElement now()
FluentProxyStateWebDriver.
It has no effect if the element is already loaded.
now in interface FluentProxyState<FluentWebElement>public FluentWebElement now(boolean force)
FluentProxyStateWebDriver.
It has no effect if the element is already loaded.
now in interface FluentProxyState<FluentWebElement>force - force the search even if element is already loadedpublic FluentWebElement reset()
FluentProxyStatereset in interface FluentProxyState<FluentWebElement>public boolean loaded()
FluentProxyStateloaded in interface FluentProxyState<FluentWebElement>public Axes axes()
public FluentConditions conditions()
public FluentWaitElement await()
public MouseElementActions mouse()
public KeyboardElementActions keyboard()
public <T> T as(Class<T> componentClass)
T - type of componentcomponentClass - component classpublic FluentWebElement clear()
public FluentWebElement submit()
submit in interface FluentActions<FluentWebElement,FluentWebElement>WebElement.submit()public FluentWebElement write(String... text)
write in interface FluentActions<FluentWebElement,FluentWebElement>text - value to setWebElement.sendKeys(CharSequence...)public String name()
public String attribute(String name)
name - custom attribute namepublic String id()
public String text()
public String textContent()
public String value()
public boolean displayed()
public boolean enabled()
public boolean selected()
public boolean clickable()
public boolean stale()
public String tagName()
public org.openqa.selenium.WebElement getElement()
public org.openqa.selenium.WebElement getWrappedElement()
getWrappedElement in interface org.openqa.selenium.internal.WrapsElementpublic org.openqa.selenium.Dimension size()
public FluentList<FluentWebElement> asList()
public FluentList<FluentWebElement> $(String selector, SearchFilter... filters)
SearchControl$ in interface SearchControl<FluentWebElement>selector - CSS selectorfilters - set of filterspublic FluentWebElement el(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(org.openqa.selenium.By locator, SearchFilter... filters)
SearchControlfind in interface SearchControl<FluentWebElement>locator - elements locatorfilters - filters setpublic FluentList<FluentWebElement> find(String selector, SearchFilter... filters)
SearchControlfind in interface SearchControl<FluentWebElement>selector - CSS selectorfilters - set of filterspublic FluentList<FluentWebElement> find(SearchFilter... filters)
SearchControlfind in interface SearchControl<FluentWebElement>filters - set of filters in the current contextpublic String html()
public Fill fill()
FluentActionsfill in interface FluentActions<FluentWebElement,FluentWebElement>public FillSelect fillSelect()
FluentActionsfillSelect in interface FluentActions<FluentWebElement,FluentWebElement>public FluentWebElement frame()
FluentActionsframe in interface FluentActions<FluentWebElement,FluentWebElement>public com.google.common.base.Optional<FluentWebElement> optional()
FluentProxyStateoptional in interface FluentProxyState<FluentWebElement>FluentProxyState.present(),
FluentProxyState.now()Copyright © 2016 FluentLenium. All Rights Reserved.