Interface SwingAbstractionFacade

  • All Superinterfaces:
    AbstractionFacade

    public interface SwingAbstractionFacade
    extends AbstractionFacade
    This interface defines the methods available when using the Swing module.

    Note that a few more available methods are inherited from the generic interface AbstractionFacade.

    • Method Detail

      • click

        void click​(String xPath)
        Clicks an element.
        Parameters:
        xPath - the XPath of the element.
      • clickPoint

        void clickPoint​(String xPath,
                        Integer x,
                        Integer y)
        Clicks a point within an element.
        Parameters:
        xPath - the XPath of the element.
        x - the X coordinate, relative to the element's bounding box.
        y - the Y coordinate, relative to the element's bounding box.
      • sendKeys

        void sendKeys​(String xpath,
                      String text)
        Sends keyboard input to an element.

        Keyboard events are sent one by one, as if the text was entered character by character.

        Parameters:
        xpath - the XPath of the element.
        text - the text to send.
      • getText

        String getText​(String xpath)
        Gets the text of an element.
        Parameters:
        xpath - the XPath of the element.
        Returns:
        the textual content of the element.
      • doubleClick

        void doubleClick​(String xPath)
        Clicks an element.
        Parameters:
        xPath - the XPath of the element.
      • rightClick

        void rightClick​(String xPath)
        Right clicks an element.
        Parameters:
        xPath - the XPath of the element.
      • isVisible

        boolean isVisible​(String xpath)
        Checks whether an element is visible.
        Parameters:
        xpath - the XPath of the element.
        Returns:
        true if the element is visible, false otherwise.
      • selectItemByValue

        void selectItemByValue​(String xpath,
                               String value)
        Selects a combo box item.
        Parameters:
        xpath - the XPath of the combo box element.
        value - the item to select.
      • getValues

        List<String> getValues​(String xpath)
        Gets all items of a combo box.
        Parameters:
        xpath - the XPath of the combo box element.
        Returns:
        a list containing the combo box items.
      • getSelectedValue

        String getSelectedValue​(String xpath)
        Gets the currently selected item of a combo box.
        Parameters:
        xpath - the XPath of the combo box element.
        Returns:
        the currently selected item.
      • selectTab

        void selectTab​(String xPath,
                       String title)
        Selects a tab of a JTabbedPane.
        Parameters:
        xPath - the XPath of the JTabbedPane element.
        title - the name of the tab to select.