Package org.fluentlenium.core.action
Class FluentJavascriptActionsImpl<T>
- java.lang.Object
-
- org.fluentlenium.core.action.FluentJavascriptActionsImpl<T>
-
- Type Parameters:
T
-this
object type to chain method calls
- All Implemented Interfaces:
FluentJavascriptActions<T>
public class FluentJavascriptActionsImpl<T> extends java.lang.Object implements FluentJavascriptActions<T>
Javascript actions that can be used on a list or on a web element.Underlying webDriver must support javascript to support those actions.
-
-
Constructor Summary
Constructors Constructor Description FluentJavascriptActionsImpl(T self, JavascriptControl javascript, java.util.function.Supplier<FluentWebElement> element)
Creates a new fluent javascript actions.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description T
modifyAttribute(java.lang.String attributeName, java.lang.String attributeValue)
Modifies element attributesT
scrollIntoView()
Scrolls the current element into the visible area of the browser window.T
scrollIntoView(boolean alignWithTop)
Scrolls the current element into the visible area of the browser window.T
scrollToCenter()
Scrolls center of the current element into the visible area of the browser window, respecting window size.
-
-
-
Constructor Detail
-
FluentJavascriptActionsImpl
public FluentJavascriptActionsImpl(T self, JavascriptControl javascript, java.util.function.Supplier<FluentWebElement> element)
Creates a new fluent javascript actions.- Parameters:
self
- object that will be returned by methodsjavascript
- javascript controlelement
- Supplier of element on which execute the action
-
-
Method Detail
-
scrollIntoView
public T scrollIntoView()
Description copied from interface:FluentJavascriptActions
Scrolls the current element into the visible area of the browser window.- Specified by:
scrollIntoView
in interfaceFluentJavascriptActions<T>
- Returns:
- this object reference to chain methods calls
- See Also:
- element.scrollIntoView
-
scrollIntoView
public T scrollIntoView(boolean alignWithTop)
Description copied from interface:FluentJavascriptActions
Scrolls the current element into the visible area of the browser window.- Specified by:
scrollIntoView
in interfaceFluentJavascriptActions<T>
- Parameters:
alignWithTop
- If true, the top of the element will be aligned to the top of the visible area of the scrollable ancestor. If false, the bottom of the element will be aligned to the bottom of the visible area of the scrollable ancestor.- Returns:
- this object reference to chain methods calls
- See Also:
- element.scrollIntoView
-
scrollToCenter
public T scrollToCenter()
Description copied from interface:FluentJavascriptActions
Scrolls center of the current element into the visible area of the browser window, respecting window size.- Specified by:
scrollToCenter
in interfaceFluentJavascriptActions<T>
- Returns:
- this object reference to chain methods calls
-
modifyAttribute
public T modifyAttribute(java.lang.String attributeName, java.lang.String attributeValue)
Description copied from interface:FluentJavascriptActions
Modifies element attributes- Specified by:
modifyAttribute
in interfaceFluentJavascriptActions<T>
- Parameters:
attributeName
- attribute to be changeattributeValue
- new attribute value- Returns:
- this object reference to chain methods calls
-
-