Search in sources :

Example 1 with VerifyAlertPresentAction

use of com.testsigma.automator.actions.mobile.mobileweb.verify.VerifyAlertPresentAction 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:
            VerifyAlertAbsentAction absence = (VerifyAlertAbsentAction) this.initializeChildSnippet(VerifyAlertAbsentAction.class);
            absence.execute();
            this.setSuccessMessage(absence.getSuccessMessage());
            break;
        case ActionConstants.VISIBLE:
            VerifyAlertPresentAction available = (VerifyAlertPresentAction) this.initializeChildSnippet(VerifyAlertPresentAction.class);
            available.execute();
            this.setSuccessMessage(available.getSuccessMessage());
            break;
        default:
            setErrorMessage("Unable to Perform Verify Alert Status Action due to error at test data");
            throw new AutomatorException("Unable to Perform Verify Alert Status due to error at test data");
    }
}
Also used : AutomatorException(com.testsigma.automator.exceptions.AutomatorException) VerifyAlertPresentAction(com.testsigma.automator.actions.mobile.mobileweb.verify.VerifyAlertPresentAction) VerifyAlertAbsentAction(com.testsigma.automator.actions.mobile.mobileweb.verify.VerifyAlertAbsentAction)

Aggregations

VerifyAlertAbsentAction (com.testsigma.automator.actions.mobile.mobileweb.verify.VerifyAlertAbsentAction)1 VerifyAlertPresentAction (com.testsigma.automator.actions.mobile.mobileweb.verify.VerifyAlertPresentAction)1 AutomatorException (com.testsigma.automator.exceptions.AutomatorException)1