Class ClickHelper

java.lang.Object
core.helpers.Element
core.helpers.click.ClickHelper

public class ClickHelper extends Element
  • Constructor Details

    • ClickHelper

      public ClickHelper()
  • Method Details

    • clickAndExpect

      public void clickAndExpect(EnhancedBy target, EnhancedBy expected)
      clicks target And waits for expected element to display retries 10 times
      Parameters:
      target -
      expected -
    • clickAndExpect

      public void clickAndExpect(EnhancedBy target, EnhancedBy expected, boolean mobileRefresh)
    • clickAndExpectByText

      public void clickAndExpectByText(EnhancedBy target, String text, EnhancedBy expected)
      click And expect based on the text value on the element. eg. button with "OK" text
      Parameters:
      target -
      text -
      expected -
    • clickAndExpectContainsByText

      public void clickAndExpectContainsByText(EnhancedBy target, String text, EnhancedBy expected)
      click And expect based on the text value on the element. eg. button with "OK" text
      Parameters:
      target -
      text -
      expected -
    • clickAndExpect

      public void clickAndExpect(EnhancedBy target, int index, EnhancedBy expected, boolean mobileRefresh)
      clicks element based on index And waits for expected element to be displayed
      Parameters:
      target -
      index -
      expected -
      mobileRefresh - TODO
    • clickAndExpectNoRetry

      public void clickAndExpectNoRetry(EnhancedBy target, int index, EnhancedBy expected)
      click and expect with retrying to click the elmeent on failure
      Parameters:
      target -
      index -
      expected -
    • clickAndExpectByAction

      public void clickAndExpectByAction(EnhancedBy target, EnhancedBy expected)
      click And expect using action click
      Parameters:
      target -
      expected -
    • clickAndExpectByAction

      public void clickAndExpectByAction(EnhancedBy target, int index, EnhancedBy expected)
      click And expect using action click
      Parameters:
      target -
      index -
      expected -
    • clickAndExpect

      public void clickAndExpect(EnhancedBy target, int index, EnhancedBy expected)
      clicks element based on index And waits for expected element to be displayed
      Parameters:
      target -
      index -
      expected -
    • clickAndExpect

      public void clickAndExpect(EnhancedBy target, int index, EnhancedBy expected1, EnhancedBy expected2)
      click And expect for either element
      Parameters:
      target -
      index -
      expected1 -
      expected2 -
    • clickAndExpect

      public void clickAndExpect(EnhancedBy target, EnhancedBy expected, EnhancedBy spinner)
      clicks target And waits for expected element to show up also waits for spinner element to be removed from display
      Parameters:
      target -
      expected -
      spinner -
    • clickAndNotExpect

      public void clickAndNotExpect(EnhancedBy target, EnhancedBy expected)
    • clickAndNotExpect

      public void clickAndNotExpect(EnhancedBy target, int index, EnhancedBy expected)
      clicks target And waits for expected to not be displayed retries 10 times
      Parameters:
      target -
      expected -
    • clickAndWait

      public void clickAndWait(EnhancedBy target, double timeInSeconds)
      clicks target And waits for seconds
      Parameters:
      target -
      expected -
    • clickAndWait

      public void clickAndWait(EnhancedBy target, int index, double timeInSeconds)
      clicks target And waits for seconds
      Parameters:
      target -
      expected -
    • click

      public void click(EnhancedBy target, int index)
      click without waiting
      Parameters:
      target -
      index -
    • clickElementLocationBy

      public void clickElementLocationBy(EnhancedBy by, int x, int y)
      Click on an element's specific x,y location
      Parameters:
      by - by element
      x - x offset coordinate
      y - y offset coordinate
    • clickPoints

      public void clickPoints(int x, int y)
      click at position x, y
      Parameters:
      x -
      y -
    • clickPointsAndExpect

      public void clickPointsAndExpect(int x, int y, EnhancedBy expected)
      click point at x,y coordinates and expect and element to be present retry every 5 seconds for duration of explicit timeout
      Parameters:
      x -
      y -
      expected -
    • resetMouse

      public void resetMouse(int x, int y)
      moves mouse back to original position
      Parameters:
      x -
      y -
    • doubleClickPoints

      public void doubleClickPoints(int x, int y)
      double click at position
      Parameters:
      x -
      y -
    • clickElementContinsByText

      public void clickElementContinsByText(EnhancedBy by, String text)
      click element with text containing
      Parameters:
      by -
      text -
    • clickAndHold

      public void clickAndHold(EnhancedBy target, double seconds)
      click And hold element
      Parameters:
      target -
      seconds -
    • clickAndHold

      public void clickAndHold(EnhancedBy target, int index, double seconds)
      click And hold based on element index
      Parameters:
      target -
      index -
      seconds -
    • dragAndDrop

      public void dragAndDrop(EnhancedBy src, EnhancedBy target)
      drag And drop from src element to target element
      Parameters:
      src -
      target -
    • dragAndDrop

      public void dragAndDrop(EnhancedBy src, int srcIndex, EnhancedBy target, int targetIndex)
      drag And drop from src element to target element
      Parameters:
      src -
      target -
    • dragAndDrop

      public void dragAndDrop(EnhancedBy srcParent, int srcParentIndex, EnhancedBy srcChild, int scrChildIndex, EnhancedBy targetParent, int targeParenttIndex, EnhancedBy targetChild, int targetChildIndex)
      drag And drop from src element to target element
      Parameters:
      src -
      target -
    • dragAndDrop

      public void dragAndDrop(EnhancedBy src, int xOffset, int yOffset)
      drag And drop from src element to target element
      Parameters:
      src -
      target -