Package io.fluentlenium.core.action
Class FluentJavascriptActionsImpl<T>
java.lang.Object
io.fluentlenium.core.action.FluentJavascriptActionsImpl<T>
- Type Parameters:
T
-this
object type to chain method calls
- All Implemented Interfaces:
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
ConstructorDescriptionFluentJavascriptActionsImpl
(T self, JavascriptControl javascript, Supplier<FluentWebElement> element) Creates a new fluent javascript actions. -
Method Summary
Modifier and TypeMethodDescriptionmodifyAttribute
(String attributeName, String attributeValue) Modifies element attributesScrolls the current element into the visible area of the browser window.scrollIntoView
(boolean alignWithTop) Scrolls the current element into the visible area of the browser window.Scrolls center of the current element into the visible area of the browser window, respecting window size.
-
Constructor Details
-
FluentJavascriptActionsImpl
public FluentJavascriptActionsImpl(T self, JavascriptControl javascript, 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 Details
-
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:
-
scrollIntoView
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:
-
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
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
-