Search in sources :

Example 16 with UiElementException

use of com.axway.ats.uiengine.exceptions.UiElementException in project ats-framework by Axway.

the class SwingTable method selectRow.

/**
     * Select table rows
     *
     * @param rows row numbers to select
     * @throws VerificationException if the element doesn't exist
     */
@PublicAtsApi
public void selectRow(int... rows) {
    new SwingElementState(this).waitToBecomeExisting();
    JTableFixture tableFixture = (JTableFixture) SwingElementLocator.findFixture(this);
    try {
        tableFixture.selectRows(rows);
    } catch (Exception e) {
        throw new UiElementException(e.getMessage(), this);
    }
}
Also used : JTableFixture(org.fest.swing.fixture.JTableFixture) SwingElementState(com.axway.ats.uiengine.utilities.swing.SwingElementState) UiElementException(com.axway.ats.uiengine.exceptions.UiElementException) VerifyNotEqualityException(com.axway.ats.uiengine.exceptions.VerifyNotEqualityException) VerifyEqualityException(com.axway.ats.uiengine.exceptions.VerifyEqualityException) VerificationException(com.axway.ats.uiengine.exceptions.VerificationException) UiElementException(com.axway.ats.uiengine.exceptions.UiElementException) NotSupportedOperationException(com.axway.ats.uiengine.exceptions.NotSupportedOperationException) PublicAtsApi(com.axway.ats.common.PublicAtsApi)

Example 17 with UiElementException

use of com.axway.ats.uiengine.exceptions.UiElementException in project ats-framework by Axway.

the class SwingTable method selectCell.

/**
     * Select table cell
     *
     * @param row the row number
     * @param column the column number
     * @throws VerificationException if the table element doesn't exist
     */
@PublicAtsApi
public void selectCell(int row, int column) {
    new SwingElementState(this).waitToBecomeExisting();
    JTableFixture tableFixture = (JTableFixture) SwingElementLocator.findFixture(this);
    try {
        tableFixture.selectCell(new TableCell(row, column) {
        });
    } catch (Exception e) {
        throw new UiElementException(e.getMessage(), this);
    }
}
Also used : JTableFixture(org.fest.swing.fixture.JTableFixture) TableCell(org.fest.swing.data.TableCell) SwingElementState(com.axway.ats.uiengine.utilities.swing.SwingElementState) UiElementException(com.axway.ats.uiengine.exceptions.UiElementException) VerifyNotEqualityException(com.axway.ats.uiengine.exceptions.VerifyNotEqualityException) VerifyEqualityException(com.axway.ats.uiengine.exceptions.VerifyEqualityException) VerificationException(com.axway.ats.uiengine.exceptions.VerificationException) UiElementException(com.axway.ats.uiengine.exceptions.UiElementException) NotSupportedOperationException(com.axway.ats.uiengine.exceptions.NotSupportedOperationException) PublicAtsApi(com.axway.ats.common.PublicAtsApi)

Example 18 with UiElementException

use of com.axway.ats.uiengine.exceptions.UiElementException in project ats-framework by Axway.

the class SwingTree method expandTree.

private void expandTree(JTreeFixture treeFixture, String... treeItems) {
    List<String> path = new ArrayList<String>();
    try {
        for (String treeItem : treeItems) {
            path.add(treeItem);
            treeFixture.expandPath(buildPath(path.toArray(new String[0])));
        }
    } catch (Exception e) {
        throw new UiElementException(e.getMessage(), this);
    }
}
Also used : ArrayList(java.util.ArrayList) UiElementException(com.axway.ats.uiengine.exceptions.UiElementException) UiElementException(com.axway.ats.uiengine.exceptions.UiElementException) VerificationException(com.axway.ats.uiengine.exceptions.VerificationException)

Aggregations

UiElementException (com.axway.ats.uiengine.exceptions.UiElementException)18 PublicAtsApi (com.axway.ats.common.PublicAtsApi)16 SwingElementState (com.axway.ats.uiengine.utilities.swing.SwingElementState)16 VerificationException (com.axway.ats.uiengine.exceptions.VerificationException)13 NotSupportedOperationException (com.axway.ats.uiengine.exceptions.NotSupportedOperationException)11 JTableFixture (org.fest.swing.fixture.JTableFixture)11 VerifyEqualityException (com.axway.ats.uiengine.exceptions.VerifyEqualityException)10 VerifyNotEqualityException (com.axway.ats.uiengine.exceptions.VerifyNotEqualityException)10 TableCell (org.fest.swing.data.TableCell)7 ArrayList (java.util.ArrayList)2 JSpinnerFixture (org.fest.swing.fixture.JSpinnerFixture)2 JTabbedPaneFixture (org.fest.swing.fixture.JTabbedPaneFixture)2 JTableHeaderFixture (org.fest.swing.fixture.JTableHeaderFixture)2 HttpsClient (com.axway.ats.core.filetransfer.HttpsClient)1 UiElementProperties (com.axway.ats.uiengine.elements.UiElementProperties)1 File (java.io.File)1 URL (java.net.URL)1 Pattern (java.util.regex.Pattern)1 LocationUnavailableException (org.fest.swing.exception.LocationUnavailableException)1 JComboBoxFixture (org.fest.swing.fixture.JComboBoxFixture)1