Class PageBase

  • Direct Known Subclasses:
    CucumberPageBase, WinPageBase

    @Deprecated
    public abstract class PageBase
    extends java.lang.Object
    Deprecated.
    This class represents the things in common between Windows, Web and Mobile projects
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static java.lang.String BASE_URL
      Deprecated.
      This is the Base url for all system to be tested
      protected org.openqa.selenium.support.events.EventFiringWebDriver driver
      Deprecated.
       
      protected org.openqa.selenium.support.ui.FluentWait<org.openqa.selenium.support.events.EventFiringWebDriver> fluentWait
      Deprecated.
       
      protected java.lang.String url
      Deprecated.
      This is the url that correspond to this child page and should be initialized in child constructor child page
      protected org.openqa.selenium.support.ui.WebDriverWait wait
      Deprecated.
       
    • Constructor Summary

      Constructors 
      Constructor Description
      PageBase()
      Deprecated.
       
      PageBase​(org.openqa.selenium.support.events.EventFiringWebDriver driver)
      Deprecated.
       
    • Method Summary

      All Methods Instance Methods Concrete Methods Deprecated Methods 
      Modifier and Type Method Description
      void click​(java.lang.String locatorName)
      Deprecated.
      Click the element provided by the locator name
      protected void click​(org.openqa.selenium.WebElement element)
      Deprecated.
       
      void clickElement​(org.openqa.selenium.By locator)
      Deprecated.
      use click(String locatorName) method
      void clickElement​(org.openqa.selenium.WebElement element)
      Deprecated.
      use click(String locatorName) method
      void completeField​(org.openqa.selenium.By locator, java.lang.String value)
      Deprecated.
      use setInput(String locatorName, String value) method
      void completeField​(org.openqa.selenium.WebElement element, java.lang.String value)
      Deprecated.
      void completeFieldWithoutClear​(org.openqa.selenium.By locator, java.lang.String value)
      Deprecated.
      use setInput(String locatorName, String value) method
      void completeFieldWithoutClear​(org.openqa.selenium.WebElement element, java.lang.String value)
      Deprecated.
      void completeFieldWithoutClick​(org.openqa.selenium.By locator, java.lang.String value)
      Deprecated.
      use setInput(String locatorName, String value) method
      void completeFieldWithoutClick​(org.openqa.selenium.WebElement element, java.lang.String value)
      Deprecated.
      void deselectCheckbox​(org.openqa.selenium.By locator)
      Deprecated.
      use setCheckbox(locator, false)
      java.lang.String getAttribute​(java.lang.String locatorName, java.lang.String attribute)
      Deprecated.
      Returns element attribute selected
      org.openqa.selenium.support.events.EventFiringWebDriver getDriver()
      Deprecated.
      Method that returns the web driver
      org.openqa.selenium.WebElement getElement​(java.lang.String locatorName)
      Deprecated.
      Return WebElement with the locator name provided
      java.util.List<org.openqa.selenium.WebElement> getElements​(java.lang.String locatorName)
      Deprecated.
       
      java.lang.String getElementText​(org.openqa.selenium.By locator)
      Deprecated.
      use getText(String locatorName)
      java.lang.String getElementText​(org.openqa.selenium.WebElement element)
      Deprecated.
      org.openqa.selenium.support.ui.Wait<org.openqa.selenium.support.events.EventFiringWebDriver> getFluentWait()
      Deprecated.
      Method that returns the default fluent wait in our framework
      java.lang.String getInputValue​(org.openqa.selenium.By locator)
      Deprecated.
      use getAttribute(String locatorName, "value")
      java.lang.String getInputValue​(org.openqa.selenium.WebElement element)
      Deprecated.
      org.apache.log4j.Logger getLogger()
      Deprecated.
       
      java.lang.String getText​(java.lang.String locatorName)
      Deprecated.
      Returns element text
      org.openqa.selenium.support.ui.WebDriverWait getWait()
      Deprecated.
      Method that returns the default wait in our framework
      org.openqa.selenium.WebElement getWebElement​(org.openqa.selenium.By locator)
      Deprecated.
      use waitPresence(locatorName)
      java.util.List<org.openqa.selenium.WebElement> getWebElements​(org.openqa.selenium.By locator)
      Deprecated.
      boolean isElementEmpty​(org.openqa.selenium.By locator)
      Deprecated.
      use getText(locatorName).isEmpty()
      boolean isElementEmpty​(org.openqa.selenium.WebElement element)
      Deprecated.
      boolean isElementEnabled​(org.openqa.selenium.WebElement element)
      Deprecated.
      boolean isElementPresent​(org.openqa.selenium.By locator)
      Deprecated.
      use isPresent(locatorName)
      boolean isElementPresent​(org.openqa.selenium.WebElement element, org.openqa.selenium.By locator)
      Deprecated.
      Method that verifies if the locator specific is present in the element
      boolean isElementVisible​(org.openqa.selenium.By locator)
      Deprecated.
      boolean isElementVisible​(org.openqa.selenium.WebElement element)
      Deprecated.
      boolean isEnabled​(java.lang.String locatorName)
      Deprecated.
       
      boolean isInputElementEmpty​(org.openqa.selenium.By inputLocator)
      Deprecated.
      use getAttribute("value").isEmpty()
      boolean isInputElementEmpty​(org.openqa.selenium.WebElement element)
      Deprecated.
      boolean isPresent​(java.lang.String locatorName)
      Deprecated.
      Method that verifies if the locator specific is present
      boolean isSelected​(java.lang.String locatorName)
      Deprecated.
       
      boolean isVisible​(java.lang.String locatorName)
      Deprecated.
       
      void selectCheckbox​(org.openqa.selenium.By locator)
      Deprecated.
      use setCheckbox(locator, true)
      void setCheckbox​(java.lang.String locatorName, boolean check)
      Deprecated.
      Select or deselect checkbox
      void setInput​(java.lang.String locatorName, java.lang.String value)
      Deprecated.
      Set element input with a value provided by the locator name Default: not click and not clear the input element
      void setInput​(java.lang.String locatorName, java.lang.String value, boolean clickAndClear)
      Deprecated.
      Set element input with a value provided by the locator name
      void setInput​(java.lang.String locatorName, java.lang.String value, boolean click, boolean clear)
      Deprecated.
      Set element input with a value provided by the locator name
      protected void setInput​(org.openqa.selenium.WebElement element, java.lang.String value, boolean click, boolean clear)
      Deprecated.
       
      void setTextToClipboard​(java.lang.String value)
      Deprecated.
      Put a text 'value' on the clipboard
      void sleep​(long millis)
      Deprecated.
       
      boolean waitAndCheckElementPresent​(org.openqa.selenium.By locator)
      Deprecated.
      use waitPresence(locatorName) and the isPresent(locatorName)
      org.openqa.selenium.WebElement waitClickable​(java.lang.String locatorName)
      Deprecated.
      Wait until the element is clickable
      void waitForElementClickable​(org.openqa.selenium.By locator)
      Deprecated.
      use waitInvisibility
      void waitForElementDisappears​(org.openqa.selenium.By locator)
      Deprecated.
      use waitInvisibility
      void waitForElementInvisibility​(org.openqa.selenium.By locator)
      Deprecated.
      use waitInvisibility
      void waitForElementPresence​(org.openqa.selenium.By locator)
      Deprecated.
      use waitInvisibility
      void waitForElementVisibility​(org.openqa.selenium.By locator)
      Deprecated.
      use waitInvisibility
      void waitInvisibilities​(java.lang.String locatorName)
      Deprecated.
       
      void waitInvisibility​(java.lang.String locatorName)
      Deprecated.
      Wait until the element is invisible
      org.openqa.selenium.WebElement waitPresence​(java.lang.String locatorName)
      Deprecated.
      Wait until the element is present
      java.util.List<org.openqa.selenium.WebElement> waitPresences​(java.lang.String locatorName)
      Deprecated.
       
      void waitUntilElementDissappear​(org.openqa.selenium.By locator)
      Deprecated.
      Wait to element dissappear
      java.util.List<org.openqa.selenium.WebElement> waitVisibilities​(java.lang.String locatorName)
      Deprecated.
       
      org.openqa.selenium.WebElement waitVisibility​(java.lang.String locatorName)
      Deprecated.
      Wait until the element is visible
      • Methods inherited from class java.lang.Object

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

      • BASE_URL

        public static java.lang.String BASE_URL
        Deprecated.
        This is the Base url for all system to be tested
      • url

        protected java.lang.String url
        Deprecated.
        This is the url that correspond to this child page and should be initialized in child constructor child page
      • driver

        protected org.openqa.selenium.support.events.EventFiringWebDriver driver
        Deprecated.
      • wait

        protected org.openqa.selenium.support.ui.WebDriverWait wait
        Deprecated.
      • fluentWait

        protected org.openqa.selenium.support.ui.FluentWait<org.openqa.selenium.support.events.EventFiringWebDriver> fluentWait
        Deprecated.
    • Constructor Detail

      • PageBase

        public PageBase()
        Deprecated.
      • PageBase

        public PageBase​(org.openqa.selenium.support.events.EventFiringWebDriver driver)
        Deprecated.
    • Method Detail

      • getLogger

        public org.apache.log4j.Logger getLogger()
        Deprecated.
      • click

        public void click​(java.lang.String locatorName)
        Deprecated.
        Click the element provided by the locator name
        Parameters:
        locatorName -
      • click

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

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

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

        public void setInput​(java.lang.String locatorName,
                             java.lang.String value,
                             boolean click,
                             boolean clear)
        Deprecated.
        Set element input with a value provided by the locator name
        Parameters:
        locatorName -
        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 void setInput​(org.openqa.selenium.WebElement element,
                                java.lang.String value,
                                boolean click,
                                boolean clear)
        Deprecated.
      • getText

        public java.lang.String getText​(java.lang.String locatorName)
        Deprecated.
        Returns element text
        Parameters:
        locatorName -
        Returns:
        element text
      • getAttribute

        public java.lang.String getAttribute​(java.lang.String locatorName,
                                             java.lang.String attribute)
        Deprecated.
        Returns element attribute selected
        Parameters:
        locatorName -
        attribute -
        Returns:
        attribute value
      • getElement

        public org.openqa.selenium.WebElement getElement​(java.lang.String locatorName)
        Deprecated.
        Return WebElement with the locator name provided
        Parameters:
        locatorName -
        Returns:
      • getElements

        public java.util.List<org.openqa.selenium.WebElement> getElements​(java.lang.String locatorName)
        Deprecated.
      • waitVisibility

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

        public java.util.List<org.openqa.selenium.WebElement> waitVisibilities​(java.lang.String locatorName)
        Deprecated.
      • waitPresence

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

        public java.util.List<org.openqa.selenium.WebElement> waitPresences​(java.lang.String locatorName)
        Deprecated.
      • waitClickable

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

        public void waitInvisibility​(java.lang.String locatorName)
        Deprecated.
        Wait until the element is invisible
        Parameters:
        locatorName -
      • waitInvisibilities

        public void waitInvisibilities​(java.lang.String locatorName)
        Deprecated.
      • isVisible

        public boolean isVisible​(java.lang.String locatorName)
        Deprecated.
      • isEnabled

        public boolean isEnabled​(java.lang.String locatorName)
        Deprecated.
      • isSelected

        public boolean isSelected​(java.lang.String locatorName)
        Deprecated.
      • isPresent

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

        public void setCheckbox​(java.lang.String locatorName,
                                boolean check)
        Deprecated.
        Select or deselect checkbox
        Parameters:
        locatorName -
        check -
      • getDriver

        public org.openqa.selenium.support.events.EventFiringWebDriver getDriver()
        Deprecated.
        Method that returns the web driver
        Returns:
        web driver
      • getWait

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

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

        @Deprecated
        public org.openqa.selenium.WebElement getWebElement​(org.openqa.selenium.By locator)
        Deprecated.
        use waitPresence(locatorName)
        Method that obtains the element specific
        Parameters:
        locator - of the element; could be by xpath, id, name, etc
        Returns:
        web element
      • getWebElements

        @Deprecated
        public java.util.List<org.openqa.selenium.WebElement> getWebElements​(org.openqa.selenium.By locator)
        Deprecated.
      • clickElement

        @Deprecated
        public void clickElement​(org.openqa.selenium.By locator)
        Deprecated.
        use click(String locatorName) method
        Method that clicks the element specific
        Parameters:
        locator - of the element to be clickable
      • clickElement

        @Deprecated
        public void clickElement​(org.openqa.selenium.WebElement element)
        Deprecated.
        use click(String locatorName) method
        Method that clicks the element specific
        Parameters:
        element - to be clickable
      • completeField

        @Deprecated
        public void completeField​(org.openqa.selenium.By locator,
                                  java.lang.String value)
        Deprecated.
        use setInput(String locatorName, String value) method
        Method that completes the input field specific with a value specific First: obtains the element, Second: clean the field, Third: complete the field.
        Parameters:
        locator - of the element to be completed
        value - that i want to write in the field
      • completeField

        @Deprecated
        public void completeField​(org.openqa.selenium.WebElement element,
                                  java.lang.String value)
        Deprecated.
      • completeFieldWithoutClear

        @Deprecated
        public void completeFieldWithoutClear​(org.openqa.selenium.By locator,
                                              java.lang.String value)
        Deprecated.
        use setInput(String locatorName, String value) method
        Complete field without doing clear of the element. Only clicks the element and complete the field with the value.
        Parameters:
        locator - of the element to be completed
        value - that i want to write in the field
      • completeFieldWithoutClick

        @Deprecated
        public void completeFieldWithoutClick​(org.openqa.selenium.By locator,
                                              java.lang.String value)
        Deprecated.
        use setInput(String locatorName, String value) method
        Complete field without clicking it. Only clear the element and complete the field with the value.
        Parameters:
        locator - of the element to be completed
        value - that i want to write in the field
      • completeFieldWithoutClear

        @Deprecated
        public void completeFieldWithoutClear​(org.openqa.selenium.WebElement element,
                                              java.lang.String value)
        Deprecated.
      • completeFieldWithoutClick

        @Deprecated
        public void completeFieldWithoutClick​(org.openqa.selenium.WebElement element,
                                              java.lang.String value)
        Deprecated.
      • getElementText

        @Deprecated
        public java.lang.String getElementText​(org.openqa.selenium.By locator)
        Deprecated.
        use getText(String locatorName)
        Method that get the text of a element.
        Parameters:
        locator - of the element to be completed
      • getElementText

        @Deprecated
        public java.lang.String getElementText​(org.openqa.selenium.WebElement element)
        Deprecated.
      • getInputValue

        @Deprecated
        public java.lang.String getInputValue​(org.openqa.selenium.By locator)
        Deprecated.
        use getAttribute(String locatorName, "value")
        Method that get the attribute 'value' of a element, usually an input.
        Parameters:
        locator - of the element to be completed
      • getInputValue

        @Deprecated
        public java.lang.String getInputValue​(org.openqa.selenium.WebElement element)
        Deprecated.
      • selectCheckbox

        @Deprecated
        public void selectCheckbox​(org.openqa.selenium.By locator)
        Deprecated.
        use setCheckbox(locator, true)
        Method that checks the option specific if it is not selected
        Parameters:
        locator - of the checkbox
      • deselectCheckbox

        @Deprecated
        public void deselectCheckbox​(org.openqa.selenium.By locator)
        Deprecated.
        use setCheckbox(locator, false)
        Method that un checks the option specific if it is not unselected
        Parameters:
        locator - of the checkbox
      • isElementPresent

        @Deprecated
        public boolean isElementPresent​(org.openqa.selenium.By locator)
        Deprecated.
        use isPresent(locatorName)
        Method that verifies if the element specific is present in the window
        Parameters:
        locator - of the element specific
        Returns:
        true if the element is present, false otherwise
      • isElementVisible

        @Deprecated
        public boolean isElementVisible​(org.openqa.selenium.WebElement element)
        Deprecated.
      • isElementVisible

        @Deprecated
        public boolean isElementVisible​(org.openqa.selenium.By locator)
        Deprecated.
      • waitAndCheckElementPresent

        @Deprecated
        public boolean waitAndCheckElementPresent​(org.openqa.selenium.By locator)
        Deprecated.
        use waitPresence(locatorName) and the isPresent(locatorName)
        Method that verifies if the element specific is present in the window
        Parameters:
        locator - of the element specific
        Returns:
        true if the element is present, false otherwise
      • isElementPresent

        public boolean isElementPresent​(org.openqa.selenium.WebElement element,
                                        org.openqa.selenium.By locator)
        Deprecated.
        Method that verifies if the locator specific is present in the element
        Parameters:
        element -
        locator -
        Returns:
        true if is present, false otherwise
      • isInputElementEmpty

        @Deprecated
        public boolean isInputElementEmpty​(org.openqa.selenium.By inputLocator)
        Deprecated.
        use getAttribute("value").isEmpty()
        Method that verifies if the input is not empty
        Parameters:
        inputLocator -
        Returns:
        true if the input is empty, false otherwise
      • isInputElementEmpty

        @Deprecated
        public boolean isInputElementEmpty​(org.openqa.selenium.WebElement element)
        Deprecated.
      • isElementEmpty

        @Deprecated
        public boolean isElementEmpty​(org.openqa.selenium.By locator)
        Deprecated.
        use getText(locatorName).isEmpty()
        Method that verifies if the element is not empty
        Parameters:
        locator -
        Returns:
        true if the element is empty, false otherwise
      • isElementEmpty

        @Deprecated
        public boolean isElementEmpty​(org.openqa.selenium.WebElement element)
        Deprecated.
      • waitForElementDisappears

        @Deprecated
        public void waitForElementDisappears​(org.openqa.selenium.By locator)
        Deprecated.
        use waitInvisibility
        Wait until an element disappear
      • waitForElementVisibility

        @Deprecated
        public void waitForElementVisibility​(org.openqa.selenium.By locator)
        Deprecated.
        use waitInvisibility
        Wait until an element is visible
      • waitForElementInvisibility

        @Deprecated
        public void waitForElementInvisibility​(org.openqa.selenium.By locator)
        Deprecated.
        use waitInvisibility
        Wait until an element is not visible
      • waitForElementClickable

        @Deprecated
        public void waitForElementClickable​(org.openqa.selenium.By locator)
        Deprecated.
        use waitInvisibility
        Wait until an element is clickable
      • waitForElementPresence

        @Deprecated
        public void waitForElementPresence​(org.openqa.selenium.By locator)
        Deprecated.
        use waitInvisibility
        Wait until an element is presence
      • setTextToClipboard

        public void setTextToClipboard​(java.lang.String value)
        Deprecated.
        Put a text 'value' on the clipboard
        Parameters:
        value - String of text that is required put on th clipboard
      • waitUntilElementDissappear

        public void waitUntilElementDissappear​(org.openqa.selenium.By locator)
        Deprecated.
        Wait to element dissappear
        Parameters:
        locator - By element that it has to disappear
      • isElementEnabled

        @Deprecated
        public boolean isElementEnabled​(org.openqa.selenium.WebElement element)
        Deprecated.
      • sleep

        public void sleep​(long millis)
        Deprecated.