use of org.fest.swing.core.Robot in project intellij-community by JetBrains.
the class GuiTestUtil method findAndClickButtonWhenEnabled.
public static void findAndClickButtonWhenEnabled(@NotNull ContainerFixture<? extends Container> container, @NotNull final String text) {
Robot robot = container.robot();
final JButton button = findButton(container, text, robot);
Pause.pause(new Condition("Wait for button " + text + " to be enabled.") {
@Override
public boolean test() {
return button.isEnabled() && button.isVisible() && button.isShowing();
}
}, SHORT_TIMEOUT);
robot.click(button);
}
use of org.fest.swing.core.Robot in project android by JetBrains.
the class GuiTests method findAndClickButton.
public static void findAndClickButton(@NotNull ContainerFixture<? extends Container> container, @NotNull String text) {
Robot robot = container.robot();
new JButtonFixture(robot, GuiTests.waitUntilShowing(robot, container.target(), Matchers.byText(JButton.class, text))).click();
}
use of org.fest.swing.core.Robot in project android by JetBrains.
the class GuiTests method findAndClickButtonWhenEnabled.
public static void findAndClickButtonWhenEnabled(@NotNull ContainerFixture<? extends Container> container, @NotNull String text) {
Robot robot = container.robot();
new JButtonFixture(robot, GuiTests.waitUntilShowingAndEnabled(robot, container.target(), Matchers.byText(JButton.class, text))).click();
}
Aggregations