Class AbstractGuiElementCoreDecorator

    • Constructor Detail

      • AbstractGuiElementCoreDecorator

        public AbstractGuiElementCoreDecorator​(GuiElementCore decoratedCore)
    • Method Detail

      • isPresent

        public boolean isPresent()
        Description copied from interface: GuiElementCore
        Checks if an element is found by webdriver.
        Specified by:
        isPresent in interface GuiElementCore
        Returns:
        true if found, false otherwise.
      • isEnabled

        public boolean isEnabled()
        Description copied from interface: GuiElementCore
        WebElement.isEnabled.
        Specified by:
        isEnabled in interface GuiElementCore
        Returns:
        true if element is enabled.
      • isDisplayed

        public boolean isDisplayed()
        Description copied from interface: GuiElementCore
        WebElement.isDisplayed.
        Specified by:
        isDisplayed in interface GuiElementCore
        Returns:
        true if element is displayed.
      • isSelected

        public boolean isSelected()
        Description copied from interface: GuiElementCore
        WebElement.isSelected.
        Specified by:
        isSelected in interface GuiElementCore
        Returns:
        true if element is selected.
      • getText

        public java.lang.String getText()
        Description copied from interface: GuiElementCore
        Calls WebElement.getText. Please note that this will only return a String, if the elements text is actually visible.
        Specified by:
        getText in interface GuiElementCore
        Returns:
        text of the element.
      • getAttribute

        public java.lang.String getAttribute​(java.lang.String attributeName)
        Description copied from interface: GuiElementCore
        WebElement.getAttribute.
        Specified by:
        getAttribute in interface GuiElementCore
        Parameters:
        attributeName - Name of the attribute.
        Returns:
        The value of the attribute.
      • getRect

        public org.openqa.selenium.Rectangle getRect()
        Description copied from interface: GuiElementCore
        Gets the element's rectangle
        Specified by:
        getRect in interface GuiElementCore
      • isSelectable

        public boolean isSelectable()
        Description copied from interface: GuiElementCore
        Checks if the element is selectable.
        Specified by:
        isSelectable in interface GuiElementCore
        Returns:
        ture, if the element is selectable
      • findWebElement

        public void findWebElement​(java.util.function.Consumer<org.openqa.selenium.WebElement> consumer)
        Description copied from interface: WebElementRetainer
        Supplies the first found filtered WebElement to a consumer. This makes sure that the element is present it it's current scope and not stale
        Specified by:
        findWebElement in interface WebElementRetainer
      • getTagName

        public java.lang.String getTagName()
        Description copied from interface: GuiElementCore
        WebElement.getTagName.
        Specified by:
        getTagName in interface GuiElementCore
        Returns:
        The tag name as String.
      • getLocation

        public org.openqa.selenium.Point getLocation()
        Description copied from interface: GuiElementCore
        WebElement.getLocation.
        Specified by:
        getLocation in interface GuiElementCore
        Returns:
        The location of the webelement.
      • getSize

        public org.openqa.selenium.Dimension getSize()
        Description copied from interface: GuiElementCore
        WebElement.getSize.
        Specified by:
        getSize in interface GuiElementCore
        Returns:
        Size of the webelement.
      • getCssValue

        public java.lang.String getCssValue​(java.lang.String cssIdentifier)
        Description copied from interface: GuiElementCore
        WebElement.getCssValue.
        Specified by:
        getCssValue in interface GuiElementCore
        Parameters:
        cssIdentifier - .
        Returns:
        Css value of the webelement.
      • getTextsFromChildren

        public java.util.List<java.lang.String> getTextsFromChildren()
        Description copied from interface: GuiElementCore
        Returns with all texts of child-elements.
        Specified by:
        getTextsFromChildren in interface GuiElementCore
        Returns:
        .
      • getLengthOfValueAfterSendKeys

        public int getLengthOfValueAfterSendKeys​(java.lang.String textToInput)
        Description copied from interface: GuiElementCore
        Types your text and returns the length of the attribute 'value' afterwards. Can be useful to check a maximal input length
        Specified by:
        getLengthOfValueAfterSendKeys in interface GuiElementCore
        Parameters:
        textToInput - text to check
        Returns:
        Length of the attribute 'value'
        See Also:
        *
      • getNumberOfFoundElements

        public int getNumberOfFoundElements()
        Description copied from interface: GuiElementCore
        A given location strategy (Locator + WebElementFilter) can match to many elements in a Website. This method returns that number. This can be useful for tests, that want to ensure that a GuiElement is found n times.
        Specified by:
        getNumberOfFoundElements in interface GuiElementCore
        Returns:
        The number, how many WebElements were identified by this GuiElement.
      • takeScreenshot

        public java.io.File takeScreenshot()
        Description copied from interface: GuiElementCore
        Takes a screenshot of the GuiElement
        Specified by:
        takeScreenshot in interface GuiElementCore
        Returns:
        File object of the screenshot or NULL on error
      • isVisible

        public boolean isVisible​(boolean fullyVisible)
        Description copied from interface: GuiElementCore
        Checks if the element is visible in the current viewport
        Specified by:
        isVisible in interface GuiElementCore
        Returns: