Class ElementActionsHelper

java.lang.Object
com.shaft.gui.element.internal.ElementActionsHelper

public class ElementActionsHelper extends Object
  • Field Details

  • Constructor Details

    • ElementActionsHelper

      public ElementActionsHelper(boolean isSilent)
  • Method Details

    • waitForElementPresenceWithReducedTimeout

      public int waitForElementPresenceWithReducedTimeout(org.openqa.selenium.WebDriver driver, org.openqa.selenium.By elementLocator)
    • waitForElementPresence

      public List<Object> waitForElementPresence(org.openqa.selenium.WebDriver driver, org.openqa.selenium.By elementLocator)
    • waitForElementPresence

      public List<Object> waitForElementPresence(org.openqa.selenium.WebDriver driver, String elementReferenceScreenshot)
    • waitForElementInvisibility

      public boolean waitForElementInvisibility(org.openqa.selenium.WebDriver driver, org.openqa.selenium.By elementLocator)
    • waitForElementPresence

      public List<Object> waitForElementPresence(org.openqa.selenium.WebDriver driver, org.openqa.selenium.By elementLocator, boolean checkForVisibility, Object... action)
    • scrollToFindElement

      public List<Object> scrollToFindElement(org.openqa.selenium.WebDriver driver, org.openqa.selenium.By elementLocator)
    • waitForElementToBeClickable

      public boolean waitForElementToBeClickable(org.openqa.selenium.WebDriver driver, org.openqa.selenium.By elementLocator, String actionToExecute)
    • waitForElementTextToBeNot

      public boolean waitForElementTextToBeNot(org.openqa.selenium.WebDriver driver, org.openqa.selenium.By elementLocator, String textShouldNotBe)
    • waitForElementAttributeToBe

      public boolean waitForElementAttributeToBe(org.openqa.selenium.WebDriver driver, org.openqa.selenium.By elementLocator, String att, String expectedValue)
      Waits for the attribute of the specified element to be a specific value.
      Parameters:
      driver - the WebDriver instance used to interact with the browser
      elementLocator - the locator used to find the element
      att - the name of the attribute to wait for
      expectedValue - the expected value of the attribute
      Returns:
      true if the attribute value matches the expected value within the timeout period, otherwise false
    • getWebElementFromPointUsingJavascript

      public org.openqa.selenium.WebElement getWebElementFromPointUsingJavascript(org.openqa.selenium.WebDriver driver, List<Integer> point, boolean scrollToElement)
    • clickUsingJavascript

      public void clickUsingJavascript(org.openqa.selenium.WebDriver driver, org.openqa.selenium.By elementLocator)
    • dragAndDropUsingJavascript

      public void dragAndDropUsingJavascript(org.openqa.selenium.WebDriver driver, org.openqa.selenium.By sourceElementLocator, org.openqa.selenium.By destinationElementLocator)
    • dragAndDropUsingActions

      public void dragAndDropUsingActions(org.openqa.selenium.WebDriver driver, org.openqa.selenium.By sourceElementLocator, org.openqa.selenium.By destinationElementLocator)
    • executeNativeMobileCommandUsingJavascript

      public void executeNativeMobileCommandUsingJavascript(org.openqa.selenium.WebDriver driver, String command, Map<String,String> parameters)
    • submitFormUsingJavascript

      public void submitFormUsingJavascript(org.openqa.selenium.WebDriver driver, org.openqa.selenium.By elementLocator)
    • changeWebElementVisibilityUsingJavascript

      public void changeWebElementVisibilityUsingJavascript(org.openqa.selenium.WebDriver driver, org.openqa.selenium.By elementLocator, boolean desiredIsVisibleState)
    • setValueUsingJavascript

      public boolean setValueUsingJavascript(org.openqa.selenium.WebDriver driver, org.openqa.selenium.By elementLocator, String value)
    • setValueUsingJavascript

      public boolean setValueUsingJavascript(org.openqa.selenium.WebDriver driver, ElementInformation elementInformation, String value)
    • suggestNewXpathUsingJavascript

      public String suggestNewXpathUsingJavascript(org.openqa.selenium.WebDriver driver, org.openqa.selenium.WebElement targetElement)
    • suggestNewXpathUsingJavascript

      public String suggestNewXpathUsingJavascript(org.openqa.selenium.WebDriver driver, org.openqa.selenium.WebElement targetElement, org.openqa.selenium.By deprecatedElementLocator)
    • takeScreenshot

      public List<Object> takeScreenshot(org.openqa.selenium.WebDriver driver, org.openqa.selenium.By elementLocator, String actionName, String testData, boolean passFailStatus)
    • getElementName

      public String getElementName(org.openqa.selenium.WebDriver driver, org.openqa.selenium.By elementLocator)
    • performClipboardActions

      public boolean performClipboardActions(org.openqa.selenium.WebDriver driver, ClipboardAction action)
    • readElementText

      public String readElementText(org.openqa.selenium.WebDriver driver, ElementInformation elementInformation)
    • typeWrapper

      public String typeWrapper(org.openqa.selenium.WebDriver driver, ElementInformation elementInformation, String targetText)
    • isFoundInStacktrace

      public boolean isFoundInStacktrace(Class<?> classObject, Throwable throwable)
    • performActionAgainstUniqueElement

      public List<Object> performActionAgainstUniqueElement(org.openqa.selenium.WebDriver driver, org.openqa.selenium.By elementLocator, Object... action)
    • performActionAgainstUniqueElementIgnoringVisibility

      public List<Object> performActionAgainstUniqueElementIgnoringVisibility(org.openqa.selenium.WebDriver driver, org.openqa.selenium.By elementLocator, Object... action)
    • identifyUniqueElement

      public List<Object> identifyUniqueElement(org.openqa.selenium.WebDriver driver, org.openqa.selenium.By elementLocator)
    • identifyUniqueElementIgnoringVisibility

      public List<Object> identifyUniqueElementIgnoringVisibility(org.openqa.selenium.WebDriver driver, org.openqa.selenium.By elementLocator)
    • getMatchingElementsInformation

      public List<Object> getMatchingElementsInformation(org.openqa.selenium.WebDriver driver, org.openqa.selenium.By elementLocator, boolean checkForVisibility, Object... action)
    • getElementsCount

      public int getElementsCount(org.openqa.selenium.WebDriver driver, org.openqa.selenium.By elementLocator)
      Returns the number of elements that match a certain elementLocator
      Parameters:
      driver - the current instance of Selenium WebDriver
      elementLocator - the locator of the webElement under test (By xpath, id, selector, name ...etc.)
      Returns:
      integer value that represents the number of elements that match the desired elementLocator
    • passAction

      public void passAction(org.openqa.selenium.WebDriver driver, org.openqa.selenium.By elementLocator, String testData, List<Object> screenshot, String elementName)
    • passAction

      public void passAction(org.openqa.selenium.WebDriver driver, org.openqa.selenium.By elementLocator, String actionName, String testData, List<List<Object>> screenshots, String elementName)
    • failAction

      public void failAction(org.openqa.selenium.WebDriver driver, org.openqa.selenium.By elementLocator, Throwable... rootCauseException)
    • failAction

      public void failAction(org.openqa.selenium.WebDriver driver, String testData, org.openqa.selenium.By elementLocator, Throwable... rootCauseException)
    • failAction

      public void failAction(org.openqa.selenium.WebDriver driver, String testData, org.openqa.selenium.By elementLocator, List<List<Object>> attachments, Throwable... rootCauseException)
    • failAction

      public void failAction(org.openqa.selenium.WebDriver driver, String actionName, String testData, org.openqa.selenium.By elementLocator, List<List<Object>> screenshots, Throwable... rootCauseException)
    • createReportMessage

      public String createReportMessage(String actionName, String testData, String elementName, Boolean passFailStatus)
    • reportActionResult

      public String reportActionResult(org.openqa.selenium.WebDriver driver, String actionName, String testData, org.openqa.selenium.By elementLocator, List<List<Object>> screenshots, String elementName, Boolean passFailStatus, Throwable... rootCauseException)