use of com.axway.ats.common.PublicAtsApi in project ats-framework by Axway.
the class SwingMultiSelectList method verifyNotValue.
/**
* Verify the specified value is NOT selected
*
* @param notExpectedValue
* @throws VerificationException if the element doesn't exist
* @throws VerifyNotEqualityException if the verification fails
*/
@Override
@PublicAtsApi
public void verifyNotValue(String notExpectedValue) {
new SwingElementState(this).waitToBecomeExisting();
JListFixture listFixture = ((JListFixture) SwingElementLocator.findFixture(this));
String selectedValue = (String) listFixture.component().getSelectedValue();
if ((notExpectedValue == null && selectedValue == null) || (StringUtils.isNotNullAndEquals(selectedValue, notExpectedValue))) {
throw new VerifyNotEqualityException(notExpectedValue, this);
}
}
use of com.axway.ats.common.PublicAtsApi 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.common.PublicAtsApi in project ats-framework by Axway.
the class SwingMultiSelectList method unsetValue.
/**
* Unset MultiSelectList value
* @throws VerificationException if the element doesn't exist
*/
@Override
@PublicAtsApi
public void unsetValue(String value) {
if (Arrays.asList(getValues()).contains(value)) {
JListFixture listFixture = ((JListFixture) SwingElementLocator.findFixture(this));
listFixture.pressKey(KeyEvent.VK_CONTROL);
try {
listFixture.clickItem(value);
} finally {
listFixture.releaseKey(KeyEvent.VK_CONTROL);
}
}
}
use of com.axway.ats.common.PublicAtsApi 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.common.PublicAtsApi 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();
}
Aggregations