use of com.testsigma.automator.actions.mobile.ios.verify.VerifyElementEnabledAction in project testsigma by testsigmahq.
the class IfElementProxyAction method execute.
@Override
public void execute() throws Exception {
String status = getTestData();
switch(status) {
case ActionConstants.ENABLED:
VerifyElementEnabledAction enabled = (VerifyElementEnabledAction) this.initializeChildSnippet(VerifyElementEnabledAction.class);
enabled.execute();
this.setSuccessMessage(enabled.getSuccessMessage());
break;
case ActionConstants.DISABLED:
VerifyElementDisabledAction disabled = (VerifyElementDisabledAction) this.initializeChildSnippet(VerifyElementDisabledAction.class);
disabled.execute();
this.setSuccessMessage(disabled.getSuccessMessage());
break;
case ActionConstants.VISIBLE:
VerifyElementPresenceAction visible = (VerifyElementPresenceAction) this.initializeChildSnippet(VerifyElementPresenceAction.class);
visible.execute();
this.setSuccessMessage(visible.getSuccessMessage());
break;
case ActionConstants.NOT_VISIBLE:
VerifyElementAbsenceAction notVisible = (VerifyElementAbsenceAction) this.initializeChildSnippet(VerifyElementAbsenceAction.class);
notVisible.execute();
this.setSuccessMessage(notVisible.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");
}
}
Aggregations