Search in sources :

Example 1 with JMenuItemMatcher

use of org.fest.swing.driver.JMenuItemMatcher in project ats-framework by Axway.

the class SwingElementFinder method menuItemWithPath.

public static JMenuItemFixture menuItemWithPath(Robot robot, Container root, String... path) {
    ComponentMatcher m = new JMenuItemMatcher(path);
    Component item = robot.finder().find(root, m);
    assertThat(item).as(format(item)).isInstanceOf(JMenuItem.class);
    return new JMenuItemFixture(robot, (JMenuItem) item);
}
Also used : JMenuItemMatcher(org.fest.swing.driver.JMenuItemMatcher) JMenuItemFixture(org.fest.swing.fixture.JMenuItemFixture) ComponentMatcher(org.fest.swing.core.ComponentMatcher) Component(java.awt.Component)

Aggregations

Component (java.awt.Component)1 ComponentMatcher (org.fest.swing.core.ComponentMatcher)1 JMenuItemMatcher (org.fest.swing.driver.JMenuItemMatcher)1 JMenuItemFixture (org.fest.swing.fixture.JMenuItemFixture)1