Class ActionManager

    • Constructor Summary

      Constructors 
      Constructor Description
      ActionManager()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static void clean()  
      static void click​(java.lang.String locatorElement, java.lang.String... locatorReplacementValue)
      Click the element provided by the locator name
      protected static void click​(org.openqa.selenium.WebElement element)  
      static java.lang.String getAttribute​(java.lang.String locatorElement, java.lang.String attribute, java.lang.String... locatorReplacementValue)
      Returns element attribute selected
      static org.openqa.selenium.WebElement getElement​(java.lang.String locatorElement, java.lang.String... locatorReplacementValue)
      Return WebElement with the locator name provided
      static org.openqa.selenium.WebElement getElementByParent​(java.lang.String locatorParent, java.lang.String locatorElement, java.lang.String... locatorReplacementValue)  
      static java.util.List<org.openqa.selenium.WebElement> getElements​(java.lang.String locatorElement, java.lang.String... locatorReplacementValue)  
      static java.util.List<org.openqa.selenium.WebElement> getElementsByParent​(java.lang.String locatorParent, java.lang.String locatorElement, java.lang.String... locatorReplacementValue)  
      static org.openqa.selenium.support.ui.Wait<org.openqa.selenium.support.events.EventFiringWebDriver> getFluentWait()
      Method that returns the default fluent wait in our framework
      static java.lang.String getText​(java.lang.String locatorElement, java.lang.String... locatorReplacementValue)
      Returns element text
      static org.openqa.selenium.support.ui.WebDriverWait getWait()
      Method that returns the default wait in our framework
      static boolean isEnabled​(java.lang.String locatorElement, java.lang.String... locatorReplacementValue)  
      static boolean isPresent​(java.lang.String locatorElement, java.lang.String... locatorReplacementValue)
      Method that verifies if the locator specific is present
      static boolean isSelected​(java.lang.String locatorElement, java.lang.String... locatorReplacementValue)  
      static boolean isVisible​(java.lang.String locatorElement, java.lang.String... locatorReplacementValue)  
      static void setCheckbox​(java.lang.String locatorElement, java.lang.Boolean check, java.lang.String... locatorReplacementValue)
      Select or deselect checkbox
      static void setInput​(java.lang.String locatorElement, java.lang.String value, java.lang.Boolean click, java.lang.Boolean clear, java.lang.String... locatorReplacementValue)
      Set element input with a value provided by the locator name
      static void setInput​(java.lang.String locatorElement, java.lang.String value, java.lang.Boolean clickAndClear, java.lang.String... locatorReplacementValue)
      Set element input with a value provided by the locator name
      static void setInput​(java.lang.String locatorElement, java.lang.String value, java.lang.String... locatorReplacementValue)
      Set element input with a value provided by the locator name Default: not click and not clear the input element
      protected static void setInput​(org.openqa.selenium.WebElement element, java.lang.String value, java.lang.Boolean click, java.lang.Boolean clear)  
      static org.openqa.selenium.WebElement waitClickable​(java.lang.String locatorElement, java.lang.String... locatorReplacementValue)
      Wait until the element is clickable
      static void waitInvisibilities​(java.lang.String locatorElement, java.lang.String... locatorReplacementValue)  
      static void waitInvisibility​(java.lang.String locatorElement, java.lang.String... locatorReplacementValue)
      Wait until the element is invisible
      static org.openqa.selenium.WebElement waitPresence​(java.lang.String locatorElement, java.lang.String... locatorReplacementValue)
      Wait until the element is present
      static java.util.List<org.openqa.selenium.WebElement> waitPresences​(java.lang.String locatorElement, java.lang.String... locatorReplacementValue)  
      static java.util.List<org.openqa.selenium.WebElement> waitVisibilities​(java.lang.String locatorElement, java.lang.String... locatorReplacementValue)  
      static org.openqa.selenium.WebElement waitVisibility​(java.lang.String locatorElement, java.lang.String... locatorReplacementArgs)
      Wait until the element is visible
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • ActionManager

        public ActionManager()
    • Method Detail

      • clean

        public static void clean()
      • getWait

        public static org.openqa.selenium.support.ui.WebDriverWait getWait()
        Method that returns the default wait in our framework
        Returns:
        web driver wait
      • getFluentWait

        public static org.openqa.selenium.support.ui.Wait<org.openqa.selenium.support.events.EventFiringWebDriver> getFluentWait()
        Method that returns the default fluent wait in our framework
        Returns:
        wait
      • click

        public static void click​(java.lang.String locatorElement,
                                 java.lang.String... locatorReplacementValue)
        Click the element provided by the locator name
        Parameters:
        locatorElement -
      • click

        protected static void click​(org.openqa.selenium.WebElement element)
      • setInput

        public static void setInput​(java.lang.String locatorElement,
                                    java.lang.String value,
                                    java.lang.String... locatorReplacementValue)
        Set element input with a value provided by the locator name Default: not click and not clear the input element
        Parameters:
        locatorElement -
        value -
      • setInput

        public static void setInput​(java.lang.String locatorElement,
                                    java.lang.String value,
                                    java.lang.Boolean clickAndClear,
                                    java.lang.String... locatorReplacementValue)
        Set element input with a value provided by the locator name
        Parameters:
        locatorElement -
        value -
        clickAndClear - true: click and clear the input element, false: don't click and don't clear the input element
      • setInput

        public static void setInput​(java.lang.String locatorElement,
                                    java.lang.String value,
                                    java.lang.Boolean click,
                                    java.lang.Boolean clear,
                                    java.lang.String... locatorReplacementValue)
        Set element input with a value provided by the locator name
        Parameters:
        locatorElement -
        value -
        click - true: click the input element, false: don't click the input element
        clear - true: clear the input element, false: don't clear the input element
      • setInput

        protected static void setInput​(org.openqa.selenium.WebElement element,
                                       java.lang.String value,
                                       java.lang.Boolean click,
                                       java.lang.Boolean clear)
      • getText

        public static java.lang.String getText​(java.lang.String locatorElement,
                                               java.lang.String... locatorReplacementValue)
        Returns element text
        Parameters:
        locatorElement -
        Returns:
        element text
      • getAttribute

        public static java.lang.String getAttribute​(java.lang.String locatorElement,
                                                    java.lang.String attribute,
                                                    java.lang.String... locatorReplacementValue)
        Returns element attribute selected
        Parameters:
        locatorElement -
        attribute -
        Returns:
        attribute value
      • getElements

        public static java.util.List<org.openqa.selenium.WebElement> getElements​(java.lang.String locatorElement,
                                                                                 java.lang.String... locatorReplacementValue)
      • getElement

        public static org.openqa.selenium.WebElement getElement​(java.lang.String locatorElement,
                                                                java.lang.String... locatorReplacementValue)
        Return WebElement with the locator name provided
        Parameters:
        locatorElement -
        Returns:
      • getElementByParent

        public static org.openqa.selenium.WebElement getElementByParent​(java.lang.String locatorParent,
                                                                        java.lang.String locatorElement,
                                                                        java.lang.String... locatorReplacementValue)
      • getElementsByParent

        public static java.util.List<org.openqa.selenium.WebElement> getElementsByParent​(java.lang.String locatorParent,
                                                                                         java.lang.String locatorElement,
                                                                                         java.lang.String... locatorReplacementValue)
      • waitVisibility

        public static org.openqa.selenium.WebElement waitVisibility​(java.lang.String locatorElement,
                                                                    java.lang.String... locatorReplacementArgs)
        Wait until the element is visible
        Parameters:
        locatorElement -
        Returns:
        web element
      • waitVisibilities

        public static java.util.List<org.openqa.selenium.WebElement> waitVisibilities​(java.lang.String locatorElement,
                                                                                      java.lang.String... locatorReplacementValue)
      • waitPresence

        public static org.openqa.selenium.WebElement waitPresence​(java.lang.String locatorElement,
                                                                  java.lang.String... locatorReplacementValue)
        Wait until the element is present
        Parameters:
        locatorElement -
        Returns:
        web element
      • waitPresences

        public static java.util.List<org.openqa.selenium.WebElement> waitPresences​(java.lang.String locatorElement,
                                                                                   java.lang.String... locatorReplacementValue)
      • waitClickable

        public static org.openqa.selenium.WebElement waitClickable​(java.lang.String locatorElement,
                                                                   java.lang.String... locatorReplacementValue)
        Wait until the element is clickable
        Parameters:
        locatorElement -
        Returns:
        web element
      • waitInvisibility

        public static void waitInvisibility​(java.lang.String locatorElement,
                                            java.lang.String... locatorReplacementValue)
        Wait until the element is invisible
        Parameters:
        locatorElement -
      • waitInvisibilities

        public static void waitInvisibilities​(java.lang.String locatorElement,
                                              java.lang.String... locatorReplacementValue)
      • isVisible

        public static boolean isVisible​(java.lang.String locatorElement,
                                        java.lang.String... locatorReplacementValue)
      • isEnabled

        public static boolean isEnabled​(java.lang.String locatorElement,
                                        java.lang.String... locatorReplacementValue)
      • isSelected

        public static boolean isSelected​(java.lang.String locatorElement,
                                         java.lang.String... locatorReplacementValue)
      • isPresent

        public static boolean isPresent​(java.lang.String locatorElement,
                                        java.lang.String... locatorReplacementValue)
        Method that verifies if the locator specific is present
        Parameters:
        locatorElement -
        Returns:
      • setCheckbox

        public static void setCheckbox​(java.lang.String locatorElement,
                                       java.lang.Boolean check,
                                       java.lang.String... locatorReplacementValue)
        Select or deselect checkbox
        Parameters:
        locatorElement -
        check -