Search in sources :

Example 1 with MobileNativeVerifyCheckedAction

use of com.testsigma.automator.actions.mobile.android.verify.MobileNativeVerifyCheckedAction in project testsigma by testsigmahq.

the class CheckboxElementStatusAction method execute.

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

Aggregations

MobileNativeVerifyCheckedAction (com.testsigma.automator.actions.mobile.android.verify.MobileNativeVerifyCheckedAction)1 MobileNativeVerifyUnCheckedAction (com.testsigma.automator.actions.mobile.android.verify.MobileNativeVerifyUnCheckedAction)1 AutomatorException (com.testsigma.automator.exceptions.AutomatorException)1