use of com.axway.ats.uiengine.exceptions.VerifyNotEqualityException 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);
}
}
Aggregations