Package core.helpers.click
Class ClickHelper
- java.lang.Object
-
- core.helpers.Element
-
- core.helpers.click.ClickHelper
-
public class ClickHelper extends Element
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class core.helpers.Element
Element.DriverType, Element.LocatorType
-
-
Constructor Summary
Constructors Constructor Description ClickHelper()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclick(EnhancedBy target, int index)click without waitingvoidclickAndExpect(EnhancedBy target, int index, EnhancedBy expected)clicks element based on index And waits for expected element to be displayedvoidclickAndExpect(EnhancedBy target, int index, EnhancedBy expected, boolean mobileRefresh)clicks element based on index And waits for expected element to be displayedvoidclickAndExpect(EnhancedBy target, int index, EnhancedBy expected1, EnhancedBy expected2)click And expect for either elementvoidclickAndExpect(EnhancedBy target, EnhancedBy expected)clicks target And waits for expected element to display retries 10 timesvoidclickAndExpect(EnhancedBy target, EnhancedBy expected, boolean mobileRefresh)voidclickAndExpect(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 displayvoidclickAndExpectByAction(EnhancedBy target, int index, EnhancedBy expected)click And expect using action clickvoidclickAndExpectByAction(EnhancedBy target, EnhancedBy expected)click And expect using action clickvoidclickAndExpectByText(EnhancedBy target, String text, EnhancedBy expected)click And expect based on the text value on the element.voidclickAndExpectContainsByText(EnhancedBy target, String text, EnhancedBy expected)click And expect based on the text value on the element.voidclickAndExpectNoRetry(EnhancedBy target, int index, EnhancedBy expected)click and expect with retrying to click the elmeent on failurevoidclickAndHold(EnhancedBy target, double seconds)click And hold elementvoidclickAndHold(EnhancedBy target, int index, double seconds)click And hold based on element indexvoidclickAndNotExpect(EnhancedBy target, int index, EnhancedBy expected)clicks target And waits for expected to not be displayed retries 10 timesvoidclickAndNotExpect(EnhancedBy target, EnhancedBy expected)voidclickAndWait(EnhancedBy target, double timeInSeconds)clicks target And waits for secondsvoidclickAndWait(EnhancedBy target, int index, double timeInSeconds)clicks target And waits for secondsvoidclickElementContinsByText(EnhancedBy by, String text)click element with text containingvoidclickElementLocationBy(EnhancedBy by, int x, int y)Click on an element's specific x,y locationvoidclickPoints(int x, int y)click at position x, yvoidclickPointsAndExpect(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 timeoutvoiddoubleClickPoints(int x, int y)double click at positionvoiddragAndDrop(EnhancedBy src, int xOffset, int yOffset)drag And drop from src element to target elementvoiddragAndDrop(EnhancedBy src, int srcIndex, EnhancedBy target, int targetIndex)drag And drop from src element to target elementvoiddragAndDrop(EnhancedBy srcParent, int srcParentIndex, EnhancedBy srcChild, int scrChildIndex, EnhancedBy targetParent, int targeParenttIndex, EnhancedBy targetChild, int targetChildIndex)drag And drop from src element to target elementvoiddragAndDrop(EnhancedBy src, EnhancedBy target)drag And drop from src element to target elementvoidresetMouse(int x, int y)moves mouse back to original positionvoidwaitAndClick(EnhancedBy target, int index)-
Methods inherited from class core.helpers.Element
byAccessibility, byAndroidAccessibility, byAndroidClass, byAndroidId, byAndroidXpath, byClass, byCss, byId, byiOsClass, byiOSId, byiOSXpath, byLinkText, byName, byPartialLinkText, byTagName, byTextXpath, byXpath, byXpathContentDesc, findElements, findElements, findElements
-
-
-
-
Method Detail
-
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-
-
waitAndClick
public void waitAndClick(EnhancedBy target, int index)
-
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 elementx- x offset coordinatey- 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-
-
-