use of com.axway.ats.uiengine.utilities.swing.SwingElementState in project ats-framework by Axway.
the class SwingMultiSelectList method setValue.
/**
* Set MultiSelectList 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 listFixture = ((JListFixture) SwingElementLocator.findFixture(this));
listFixture.pressKey(KeyEvent.VK_CONTROL);
try {
listFixture.selectItem(value);
} finally {
listFixture.releaseKey(KeyEvent.VK_CONTROL);
}
}
use of com.axway.ats.uiengine.utilities.swing.SwingElementState in project ats-framework by Axway.
the class SwingMultiSelectList method rightClick.
/**
* @param contextMenuItems context menu items to select
*/
@PublicAtsApi
public void rightClick(String... contextMenuItems) {
new SwingElementState(this).waitToBecomeExisting();
JListFixture listFixture = ((JListFixture) SwingElementLocator.findFixture(this));
JPopupMenuFixture popUpMenu = listFixture.showPopupMenu();
popUpMenu.menuItemWithPath(contextMenuItems).click();
}
use of com.axway.ats.uiengine.utilities.swing.SwingElementState in project ats-framework by Axway.
the class SwingMultiSelectList method clearSelections.
/**
* Clears the selection
*
* @throws VerificationException if the element doesn't exist
*/
@PublicAtsApi
public void clearSelections() {
new SwingElementState(this).waitToBecomeExisting();
((JListFixture) SwingElementLocator.findFixture(this)).clearSelection();
}
use of com.axway.ats.uiengine.utilities.swing.SwingElementState in project ats-framework by Axway.
the class SwingPopupMenu method click.
/**
* Click pop-up element
* @throws VerificationException if the element doesn't exist
*/
@PublicAtsApi
public void click() {
new SwingElementState(this).waitToBecomeExisting();
((JPopupMenuFixture) SwingElementLocator.findFixture(this)).click();
}
use of com.axway.ats.uiengine.utilities.swing.SwingElementState in project ats-framework by Axway.
the class SwingPopupMenu method clickMenuItemByName.
/**
* Click {@link MenuItem} pop-up element by its 'name' attribute value
*
* @param menuItemName {@link MenuItem} name attribute value
*/
@PublicAtsApi
public void clickMenuItemByName(String menuItemName) {
new SwingElementState(this).waitToBecomeExisting();
((JPopupMenuFixture) SwingElementLocator.findFixture(this)).menuItem(menuItemName).click();
}
Aggregations