Search in sources :

Example 1 with JTextComponentDriver

use of org.fest.swing.driver.JTextComponentDriver in project android by JetBrains.

the class ResourceChooserDialogFixture method setDirectoryName.

public void setDirectoryName(@NotNull String directory) {
    Container parent = robot().finder().find(target(), JLabelMatcher.withText("Directory name:")).getParent();
    JTextComponent directoryField = robot().finder().findByType(parent, JTextComponent.class, true);
    JTextComponentDriver driver = new JTextComponentDriver(robot());
    driver.selectAll(directoryField);
    driver.setText(directoryField, directory);
}
Also used : JTextComponentDriver(org.fest.swing.driver.JTextComponentDriver) JTextComponent(javax.swing.text.JTextComponent)

Example 2 with JTextComponentDriver

use of org.fest.swing.driver.JTextComponentDriver in project intellij-community by JetBrains.

the class AbstractWizardStepFixture method replaceText.

protected void replaceText(@NotNull JTextField textField, @NotNull String text) {
    JTextComponentDriver driver = new JTextComponentDriver(robot());
    driver.selectAll(textField);
    driver.enterText(textField, text);
}
Also used : JTextComponentDriver(org.fest.swing.driver.JTextComponentDriver)

Example 3 with JTextComponentDriver

use of org.fest.swing.driver.JTextComponentDriver in project intellij-community by JetBrains.

the class ResourceChooserDialogFixture method setDirectoryName.

public void setDirectoryName(@NotNull String directory) {
    Container parent = robot().finder().find(target(), JLabelMatcher.withText("Directory name:")).getParent();
    JTextComponent directoryField = robot().finder().findByType(parent, JTextComponent.class, true);
    JTextComponentDriver driver = new JTextComponentDriver(robot());
    driver.selectAll(directoryField);
    driver.setText(directoryField, directory);
}
Also used : JTextComponentDriver(org.fest.swing.driver.JTextComponentDriver) JTextComponent(javax.swing.text.JTextComponent)

Aggregations

JTextComponentDriver (org.fest.swing.driver.JTextComponentDriver)3 JTextComponent (javax.swing.text.JTextComponent)2