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");
}
}
Aggregations