use of com.testsigma.automator.actions.mobile.mobileweb.verify.VerifyDisabledAction 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:
VerifyDisabledAction disabled = (VerifyDisabledAction) this.initializeChildSnippet(VerifyDisabledAction.class);
disabled.execute();
this.setSuccessMessage(disabled.getSuccessMessage());
break;
case ActionConstants.VISIBLE:
VerifyElementPresentAction visible = (VerifyElementPresentAction) this.initializeChildSnippet(VerifyElementPresentAction.class);
visible.execute();
this.setSuccessMessage(visible.getSuccessMessage());
break;
case ActionConstants.NOT_VISIBLE:
VerifyElementIsNotDisplayedAction notVisible = (VerifyElementIsNotDisplayedAction) this.initializeChildSnippet(VerifyElementIsNotDisplayedAction.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