Search in sources :

Example 46 with PublicAtsApi

use of com.axway.ats.common.PublicAtsApi in project ats-framework by Axway.

the class SwingSpinner method enterText.

/**
     * Enter text in the spinner text field without committing the value.
     * @throws VerificationException if the element doesn't exist
     */
@PublicAtsApi
public void enterText(String text) {
    new SwingElementState(this).waitToBecomeExisting();
    JSpinnerFixture spinnerFixture = (JSpinnerFixture) SwingElementLocator.findFixture(this);
    int delayBetweenEvents = spinnerFixture.robot.settings().delayBetweenEvents();
    try {
        // enterText() method sets the text value using the Robot, so we will speed it up
        spinnerFixture.robot.settings().delayBetweenEvents(10);
        spinnerFixture.enterText(text);
    } finally {
        spinnerFixture.robot.settings().delayBetweenEvents(delayBetweenEvents);
    }
}
Also used : SwingElementState(com.axway.ats.uiengine.utilities.swing.SwingElementState) JSpinnerFixture(org.fest.swing.fixture.JSpinnerFixture) PublicAtsApi(com.axway.ats.common.PublicAtsApi)

Example 47 with PublicAtsApi

use of com.axway.ats.common.PublicAtsApi in project ats-framework by Axway.

the class SwingTree method click.

@PublicAtsApi
public void click(String... labels) {
    new SwingElementState(this).waitToBecomeExisting();
    JTreeFixture treeFixture = (JTreeFixture) SwingElementLocator.findFixture(this);
    // sometimes it is necessary
    expandTree(treeFixture, labels);
    treeFixture.clickPath(buildPath(labels));
}
Also used : JTreeFixture(org.fest.swing.fixture.JTreeFixture) SwingElementState(com.axway.ats.uiengine.utilities.swing.SwingElementState) PublicAtsApi(com.axway.ats.common.PublicAtsApi)

Example 48 with PublicAtsApi

use of com.axway.ats.common.PublicAtsApi in project ats-framework by Axway.

the class SwingTree method expand.

@PublicAtsApi
public void expand(int rowIndex) {
    new SwingElementState(this).waitToBecomeExisting();
    ((JTreeFixture) SwingElementLocator.findFixture(this)).expandRow(rowIndex);
}
Also used : JTreeFixture(org.fest.swing.fixture.JTreeFixture) SwingElementState(com.axway.ats.uiengine.utilities.swing.SwingElementState) PublicAtsApi(com.axway.ats.common.PublicAtsApi)

Example 49 with PublicAtsApi

use of com.axway.ats.common.PublicAtsApi in project ats-framework by Axway.

the class SwingButton method click.

/**
     * Click button
     * @throws VerificationException if the element doesn't exist
     */
@Override
@PublicAtsApi
public void click() {
    new SwingElementState(this).waitToBecomeExisting();
    ((JButtonFixture) SwingElementLocator.findFixture(this)).click();
}
Also used : JButtonFixture(org.fest.swing.fixture.JButtonFixture) SwingElementState(com.axway.ats.uiengine.utilities.swing.SwingElementState) PublicAtsApi(com.axway.ats.common.PublicAtsApi)

Example 50 with PublicAtsApi

use of com.axway.ats.common.PublicAtsApi in project ats-framework by Axway.

the class SwingCheckBox method check.

/**
     * Check the CheckBox
     * @throws VerificationException if the element doesn't exist
     */
@Override
@PublicAtsApi
public void check() {
    new SwingElementState(this).waitToBecomeExisting();
    ((JCheckBoxFixture) SwingElementLocator.findFixture(this)).check();
}
Also used : SwingElementState(com.axway.ats.uiengine.utilities.swing.SwingElementState) JCheckBoxFixture(org.fest.swing.fixture.JCheckBoxFixture) PublicAtsApi(com.axway.ats.common.PublicAtsApi)

Aggregations

PublicAtsApi (com.axway.ats.common.PublicAtsApi)409 Validator (com.axway.ats.core.validation.Validator)66 SwingElementState (com.axway.ats.uiengine.utilities.swing.SwingElementState)60 WebElement (org.openqa.selenium.WebElement)57 IFileSystemOperations (com.axway.ats.core.filesystem.model.IFileSystemOperations)44 HiddenHtmlElementState (com.axway.ats.uiengine.utilities.hiddenbrowser.HiddenHtmlElementState)32 NoSuchMimePackageException (com.axway.ats.action.objects.model.NoSuchMimePackageException)31 PackageException (com.axway.ats.action.objects.model.PackageException)31 RealHtmlElementState (com.axway.ats.uiengine.utilities.realbrowser.html.RealHtmlElementState)31 MessagingException (javax.mail.MessagingException)31 VerificationException (com.axway.ats.uiengine.exceptions.VerificationException)24 ArrayList (java.util.ArrayList)18 SeleniumOperationException (com.axway.ats.uiengine.exceptions.SeleniumOperationException)16 UiElementException (com.axway.ats.uiengine.exceptions.UiElementException)16 IOException (java.io.IOException)16 JTableFixture (org.fest.swing.fixture.JTableFixture)16 Actions (org.openqa.selenium.interactions.Actions)16 NotSupportedOperationException (com.axway.ats.uiengine.exceptions.NotSupportedOperationException)15 VerifyNotEqualityException (com.axway.ats.uiengine.exceptions.VerifyNotEqualityException)15 XMLException (com.axway.ats.common.xml.XMLException)14