use of com.testsigma.automator.actions.common.NavigateBackAction in project testsigma by testsigmahq.
the class ClickOnButtonInTheBrowserProxyAction method execute.
@Override
public void execute() throws Exception {
String button = getTestData();
switch(button) {
case ActionConstants.REFRESH:
ReLoadCurrentPageAction refresh = (ReLoadCurrentPageAction) this.initializeChildSnippet(ReLoadCurrentPageAction.class);
refresh.execute();
this.setSuccessMessage(refresh.getSuccessMessage());
break;
case ActionConstants.BACK:
NavigateBackAction back = (NavigateBackAction) this.initializeChildSnippet(NavigateBackAction.class);
back.execute();
this.setSuccessMessage(back.getSuccessMessage());
break;
case ActionConstants.FORWARD:
NavigateForwardAction forward = (NavigateForwardAction) this.initializeChildSnippet(NavigateForwardAction.class);
forward.execute();
this.setSuccessMessage(forward.getSuccessMessage());
break;
default:
setErrorMessage("Unable to Click on Button in the Browser due to error at test data");
throw new AutomatorException("Unable to Click on Button in the Browser due to error at test data");
}
}
Aggregations