Search in sources :

Example 1 with VerifySwitchEnabledAction

use of com.testsigma.automator.actions.mobile.ios.verify.VerifySwitchEnabledAction in project testsigma by testsigmahq.

the class CheckboxElementStatusAction method execute.

@Override
public void execute() throws Exception {
    String status = getTestData();
    switch(status) {
        case ActionConstants.CHECKED:
            VerifySwitchEnabledAction enable = (VerifySwitchEnabledAction) this.initializeChildSnippet(VerifySwitchEnabledAction.class);
            enable.execute();
            this.setSuccessMessage(enable.getSuccessMessage());
            break;
        case ActionConstants.UN_CHECKED:
            VerifySwitchDisabledAction disable = (VerifySwitchDisabledAction) this.initializeChildSnippet(VerifySwitchDisabledAction.class);
            disable.execute();
            this.setSuccessMessage(disable.getSuccessMessage());
            break;
        default:
            setErrorMessage("Unable to Perform Verify Switch Status Action due to error at test data");
            throw new AutomatorException("Unable to Perform Verify Switch Status Action due to error at test data");
    }
}
Also used : AutomatorException(com.testsigma.automator.exceptions.AutomatorException) VerifySwitchDisabledAction(com.testsigma.automator.actions.mobile.ios.verify.VerifySwitchDisabledAction) VerifySwitchEnabledAction(com.testsigma.automator.actions.mobile.ios.verify.VerifySwitchEnabledAction)

Aggregations

VerifySwitchDisabledAction (com.testsigma.automator.actions.mobile.ios.verify.VerifySwitchDisabledAction)1 VerifySwitchEnabledAction (com.testsigma.automator.actions.mobile.ios.verify.VerifySwitchEnabledAction)1 AutomatorException (com.testsigma.automator.exceptions.AutomatorException)1