Search in sources :

Example 1 with VerifyAlertPresenceAction

use of com.testsigma.automator.actions.mobile.ios.alert.VerifyAlertPresenceAction in project testsigma by testsigmahq.

the class AlertVisibilityStatusAction method execute.

@Override
public void execute() throws Exception {
    String status = getTestData();
    switch(status) {
        case ActionConstants.NOT_VISIBLE:
            VerifyAlertAbsenceAction absence = (VerifyAlertAbsenceAction) this.initializeChildSnippet(VerifyAlertAbsenceAction.class);
            absence.execute();
            this.setSuccessMessage(absence.getSuccessMessage());
            break;
        case ActionConstants.VISIBLE:
            VerifyAlertPresenceAction available = (VerifyAlertPresenceAction) this.initializeChildSnippet(VerifyAlertPresenceAction.class);
            available.execute();
            this.setSuccessMessage(available.getSuccessMessage());
            break;
        default:
            setErrorMessage("Unable to Perform Alert Visibility Action due to error at test data");
            throw new AutomatorException("Unable to Perform Alert Visibility Action due to error at test data");
    }
}
Also used : VerifyAlertPresenceAction(com.testsigma.automator.actions.mobile.ios.alert.VerifyAlertPresenceAction) AutomatorException(com.testsigma.automator.exceptions.AutomatorException) VerifyAlertAbsenceAction(com.testsigma.automator.actions.mobile.ios.alert.VerifyAlertAbsenceAction)

Aggregations

VerifyAlertAbsenceAction (com.testsigma.automator.actions.mobile.ios.alert.VerifyAlertAbsenceAction)1 VerifyAlertPresenceAction (com.testsigma.automator.actions.mobile.ios.alert.VerifyAlertPresenceAction)1 AutomatorException (com.testsigma.automator.exceptions.AutomatorException)1