Class ScrollToView

java.lang.Object
org.kquiet.browser.action.MultiPhaseAction
org.kquiet.browser.action.ScrollToView
All Implemented Interfaces:
Composable, MultiPhased

public class ScrollToView extends MultiPhaseAction
ScrollToView is a subclass of MultiPhaseAction which scrolls an element into visible area of the browser window. StaleElementReferenceException may happen while ScrollToView tries to manipulate the element, so multi-phase is used to perform the action again.
Author:
Kimberly
  • Constructor Details

    • ScrollToView

      public ScrollToView(org.openqa.selenium.By by, boolean toTop)
      Create an action to scroll to view a specified element.
      Parameters:
      by - the element locating mechanism
      toTop - true: scroll to top;false: scroll to bottom
    • ScrollToView

      public ScrollToView(org.openqa.selenium.By by, List<org.openqa.selenium.By> frameBySequence, boolean toTop)
      Create an action to scroll to view a specified element.
      Parameters:
      by - the element locating mechanism
      frameBySequence - the sequence of the frame locating mechanism for the element resides in frame(or frame in another frame and so on)
      toTop - true: scroll to top;false: scroll to bottom
  • Method Details