use of com.axway.ats.uiengine.exceptions.VerificationException in project ats-framework by Axway.
the class HiddenHtmlAlert method clickOk.
@Override
@PublicAtsApi
public void clickOk(final String expectedAlertText) {
isProcessed = false;
webClient.setAlertHandler(new AlertHandler() {
@Override
public void handleAlert(Page alertPage, String alertText) {
isProcessed = true;
if (!alertText.equals(expectedAlertText)) {
throw new VerificationException("The expected alert message was: '" + expectedAlertText + "', but actually it is: '" + alertText + "'");
}
}
});
}
use of com.axway.ats.uiengine.exceptions.VerificationException in project ats-framework by Axway.
the class SwingTable method clickHeader.
/**
* Click table header by column name
*
* @param columnName the column name
* @throws VerificationException if the table element doesn't exist
*/
@PublicAtsApi
public void clickHeader(String columnName) {
new SwingElementState(this).waitToBecomeExisting();
JTableFixture tableFixture = (JTableFixture) SwingElementLocator.findFixture(this);
JTableHeaderFixture tableHeaderFixture = tableFixture.tableHeader();
try {
tableHeaderFixture.clickColumn(columnName);
} catch (Exception e) {
throw new UiElementException(e.getMessage(), this);
}
}
use of com.axway.ats.uiengine.exceptions.VerificationException in project ats-framework by Axway.
the class SwingTable method clickHeader.
/**
* Click table header by column index
*
* @param columnIndex the column index
* @throws VerificationException if the table element doesn't exist
*/
@PublicAtsApi
public void clickHeader(int columnIndex) {
new SwingElementState(this).waitToBecomeExisting();
JTableFixture tableFixture = (JTableFixture) SwingElementLocator.findFixture(this);
JTableHeaderFixture tableHeaderFixture = tableFixture.tableHeader();
try {
tableHeaderFixture.clickColumn(columnIndex);
} catch (Exception e) {
throw new UiElementException(e.getMessage(), this);
}
}
use of com.axway.ats.uiengine.exceptions.VerificationException in project ats-framework by Axway.
the class SwingTable method doubleClickCell.
/**
* Double click table cell
*
* @param row the row number
* @param column the column number
* @throws VerificationException if the element doesn't exist
*/
@PublicAtsApi
public void doubleClickCell(int row, int column) {
new SwingElementState(this).waitToBecomeExisting();
JTableFixture tableFixture = (JTableFixture) SwingElementLocator.findFixture(this);
try {
tableFixture.cell(new TableCell(row, column) {
}).doubleClick();
} catch (Exception e) {
throw new UiElementException(e.getMessage(), this);
}
}
use of com.axway.ats.uiengine.exceptions.VerificationException in project ats-framework by Axway.
the class SwingTable method clickCell.
/**
* Click table cell
*
* @param row the row number
* @param column the column number
* @throws VerificationException if the table element doesn't exist
*/
@PublicAtsApi
public void clickCell(int row, int column) {
new SwingElementState(this).waitToBecomeExisting();
JTableFixture tableFixture = (JTableFixture) SwingElementLocator.findFixture(this);
try {
tableFixture.cell(new TableCell(row, column) {
}).click();
} catch (Exception e) {
throw new UiElementException(e.getMessage(), this);
}
}
Aggregations