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>

public class FluentJavascriptActionsImpl<T> extends 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 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 methods
      javascript - javascript control
      element - Supplier of element on which execute the action
  • Method Details

    • 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 interface FluentJavascriptActions<T>
      Returns:
      this object reference to chain methods calls
      See Also:
    • 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 interface FluentJavascriptActions<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

      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 interface FluentJavascriptActions<T>
      Returns:
      this object reference to chain methods calls
    • modifyAttribute

      public T modifyAttribute (String attributeName, String attributeValue)
      Description copied from interface: FluentJavascriptActions
      Modifies element attributes
      Specified by:
      modifyAttribute in interface FluentJavascriptActions<T>
      Parameters:
      attributeName - attribute to be change
      attributeValue - new attribute value
      Returns:
      this object reference to chain methods calls