Class SwingElementLocator


  • public class SwingElementLocator
    extends Object
    • Constructor Detail

      • SwingElementLocator

        public SwingElementLocator()
    • Method Detail

      • findFixture

        public static org.fest.swing.fixture.ComponentFixture<? extends Component> findFixture​(UiElement uiElement)
      • getContainerFixture

        public static org.fest.swing.fixture.ContainerFixture<?> getContainerFixture​(SwingDriverInternal driver,
                                                                                     UiElementProperties containerProperties)
        Change container by specified name or title. For internal use
        Parameters:
        driver - Swing driver
        containerProperties - property with name inside
        Returns:
        the ContainerFixture
      • getWindowFixture

        public static org.fest.swing.fixture.WindowFixture<?> getWindowFixture​(SwingDriverInternal driver,
                                                                               String windowTitle,
                                                                               boolean isDialog)
                                                                        throws ElementNotFoundException
        Change window by specified name. For internal use
        Parameters:
        driver - Swing driver
        windowTitle - if null look for any visible window
        isDialog - should the search be for dialog windows
        Returns:
        the ContainerFixture
        Throws:
        ElementNotFoundException
      • getComponentHierarchy

        public static String getComponentHierarchy​(SwingDriverInternal driver)
        Parameters:
        driver - Swing driver
        Returns:
        the component hierarchy as String
      • useComponentInspector

        public static void useComponentInspector​(SwingDriverInternal driver)
        Log the clicked element (its type, properties and index in the component hierarchy from the current container)
        Parameters:
        driver - SwingDriverInternal instance