use of com.axway.ats.uiengine.utilities.swing.SwingElementState in project ats-framework by Axway.
the class SwingPopupMenu method clickMenuItemByText.
/**
* Click {@link MenuItem} pop-up element by text (actually it's the 'label' attribute value)
*
* @param menuItemText {@link MenuItem} text/label
*/
@PublicAtsApi
public void clickMenuItemByText(String... menuItemText) {
new SwingElementState(this).waitToBecomeExisting();
((JPopupMenuFixture) SwingElementLocator.findFixture(this)).menuItemWithPath(menuItemText).click();
}
use of com.axway.ats.uiengine.utilities.swing.SwingElementState in project ats-framework by Axway.
the class SwingSingleSelectList method setValue.
/**
* Set SingleSelectList value
*
* @param value the value to set
* @throws VerificationException if the element doesn't exist
*/
@Override
@PublicAtsApi
public void setValue(String value) {
new SwingElementState(this).waitToBecomeExisting();
((JListFixture) SwingElementLocator.findFixture(this)).selectItem(value);
}
use of com.axway.ats.uiengine.utilities.swing.SwingElementState in project ats-framework by Axway.
the class SwingSingleSelectList method getValue.
/**
* Get SingleSelectList value
*
* @throws VerificationException if the element doesn't exist
*/
@Override
@PublicAtsApi
public String getValue() {
new SwingElementState(this).waitToBecomeExisting();
String[] selections = ((JListFixture) SwingElementLocator.findFixture(this)).selection();
if (selections.length > 0) {
return selections[0];
}
return "";
}
use of com.axway.ats.uiengine.utilities.swing.SwingElementState 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.utilities.swing.SwingElementState 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);
}
}
Aggregations