diff --git a/source/src/main/java/org/cerberus/core/crud/dao/impl/RobotExecutorDAO.java b/source/src/main/java/org/cerberus/core/crud/dao/impl/RobotExecutorDAO.java index bcfb311d02..51aab95501 100644 --- a/source/src/main/java/org/cerberus/core/crud/dao/impl/RobotExecutorDAO.java +++ b/source/src/main/java/org/cerberus/core/crud/dao/impl/RobotExecutorDAO.java @@ -170,7 +170,7 @@ public AnswerList readByVariousByCriteria(List robot, Str searchSQL.append(" and (").append(SqlUtil.generateInClause("rbe.`robot`", robot)).append(")"); } if (!StringUtil.isEmptyOrNull(active)) { - searchSQL.append(" and (`active` = ? )"); + searchSQL.append(" and (`isactive` = ? )"); } query.append(searchSQL); diff --git a/source/src/main/java/org/cerberus/core/crud/entity/TestCaseExecution.java b/source/src/main/java/org/cerberus/core/crud/entity/TestCaseExecution.java index 8c5fc09c03..0553f12fed 100644 --- a/source/src/main/java/org/cerberus/core/crud/entity/TestCaseExecution.java +++ b/source/src/main/java/org/cerberus/core/crud/entity/TestCaseExecution.java @@ -318,6 +318,33 @@ public void addcountryEnvApplicationParams(List co }); } + public TestCaseStepExecution getTestCaseStepExecutionBySortId(int sortID){ + for(TestCaseStepExecution tcse : this.testCaseStepExecutionList){ + if (sortID == tcse.getTestCaseStep().getSort()){ + return tcse; + } + } + return null; + } + + public TestCaseStepExecution getTestCaseStepExecutionByStepId(int stepId){ + for(TestCaseStepExecution tcse : this.testCaseStepExecutionList){ + if (stepId == tcse.getTestCaseStep().getStepId()){ + return tcse; + } + } + return null; + } + + public TestCaseStepExecution getTestCaseStepExecutionExecuting(){ + for(TestCaseStepExecution tcse : this.testCaseStepExecutionList){ + if ("PE".equals(tcse.getReturnCode())){ + return tcse; + } + } + return null; + } + /** * Convert the current TestCaseExecution into JSON format * diff --git a/source/src/main/java/org/cerberus/core/crud/entity/TestCaseStepActionControlExecution.java b/source/src/main/java/org/cerberus/core/crud/entity/TestCaseStepActionControlExecution.java index d18603e6cc..f5ad3b4997 100644 --- a/source/src/main/java/org/cerberus/core/crud/entity/TestCaseStepActionControlExecution.java +++ b/source/src/main/java/org/cerberus/core/crud/entity/TestCaseStepActionControlExecution.java @@ -88,6 +88,7 @@ public class TestCaseStepActionControlExecution { * */ private TestCaseStepActionExecution testCaseStepActionExecution; + private TestCaseStepActionControl testCaseStepActionControl; private List fileList; // Host the list of the files stored at control level private MessageEvent controlResultMessage; private MessageGeneral executionResultMessage; @@ -415,6 +416,14 @@ public void setValue3Init(String value3Init) { this.value3Init = value3Init; } + public TestCaseStepActionControl getTestCaseStepActionControl() { + return testCaseStepActionControl; + } + + public void setTestCaseStepActionControl(TestCaseStepActionControl testCaseStepActionControl) { + this.testCaseStepActionControl = testCaseStepActionControl; + } + /** * Convert the current TestCaseStepActionControlExecution into JSON format * Note that if withChilds and withParents are both set to true, only the diff --git a/source/src/main/java/org/cerberus/core/crud/entity/TestCaseStepActionExecution.java b/source/src/main/java/org/cerberus/core/crud/entity/TestCaseStepActionExecution.java index 72f3956a09..5c85ff477b 100644 --- a/source/src/main/java/org/cerberus/core/crud/entity/TestCaseStepActionExecution.java +++ b/source/src/main/java/org/cerberus/core/crud/entity/TestCaseStepActionExecution.java @@ -449,6 +449,23 @@ public void addTestCaseStepActionExecutionList(List actionExecu } } + public TestCaseStepActionExecution getTestCaseStepActionExecutionBySortId(int sortID){ + for(TestCaseStepActionExecution tcsae : this.testCaseStepActionExecutionList){ + if (sortID == tcsae.getTestCaseStepAction().getSort()){ + return tcsae; + } + } + return null; + } + + public TestCaseStepActionExecution getTestCaseStepActionExecutionByActionId(int sortID){ + for(TestCaseStepActionExecution tcsae : this.testCaseStepActionExecutionList){ + if (sortID == tcsae.getTestCaseStepAction().getActionId()){ + return tcsae; + } + } + return null; + } + + public TestCaseStepActionExecution getTestCaseStepActionExecutionExecuting(){ + for(TestCaseStepActionExecution tcsae : this.testCaseStepActionExecutionList){ + if ("PE".equals(tcsae.getReturnCode())){ + return tcsae; + } + } + return null; + } + public String getDescription() { return description; } diff --git a/source/src/main/java/org/cerberus/core/engine/entity/Identifier.java b/source/src/main/java/org/cerberus/core/engine/entity/Identifier.java index 4d6df3431d..b13e2e3a74 100644 --- a/source/src/main/java/org/cerberus/core/engine/entity/Identifier.java +++ b/source/src/main/java/org/cerberus/core/engine/entity/Identifier.java @@ -71,6 +71,7 @@ public interface Identifiers { public static final String IDENTIFIER_TEXT = "text"; public static final String IDENTIFIER_COORD = "coord"; + public static final String IDENTIFIER_OFFSET = "offset"; public static final String IDENTIFIER_TITLE = "title"; public static final String IDENTIFIER_REGEXTITLE = "regexTitle"; diff --git a/source/src/main/java/org/cerberus/core/engine/execution/enums/ConditionOperatorEnum.java b/source/src/main/java/org/cerberus/core/engine/execution/enums/ConditionOperatorEnum.java index a2a686dcca..61b292a844 100644 --- a/source/src/main/java/org/cerberus/core/engine/execution/enums/ConditionOperatorEnum.java +++ b/source/src/main/java/org/cerberus/core/engine/execution/enums/ConditionOperatorEnum.java @@ -47,6 +47,12 @@ public enum ConditionOperatorEnum { CONDITIONOPERATOR_IFSTRINGNOTCONTAINS("ifStringNotContains", false), CONDITIONOPERATOR_IFTEXTINELEMENT("ifTextInElement", true), CONDITIONOPERATOR_IFTEXTNOTINELEMENT("ifTextNotInElement", true), + CONDITIONOPERATOR_IFSTEPSTATUSOK("ifStepStatusOK", false), + CONDITIONOPERATOR_IFSTEPSTATUSNE("ifStepStatusNE", false), + CONDITIONOPERATOR_IFACTIONSTATUSOK("ifActionStatusOK", false), + CONDITIONOPERATOR_IFACTIONSTATUSNE("ifActionStatusNE", false), + CONDITIONOPERATOR_IFCONTROLSTATUSOK("ifControlStatusOK", false), + CONDITIONOPERATOR_IFCONTROLSTATUSNE("ifControlStatusNE", false), CONDITIONOPERATOR_NEVER("never", false); private final String condition; diff --git a/source/src/main/java/org/cerberus/core/engine/execution/impl/ConditionService.java b/source/src/main/java/org/cerberus/core/engine/execution/impl/ConditionService.java index 50f303615f..07271a05d0 100644 --- a/source/src/main/java/org/cerberus/core/engine/execution/impl/ConditionService.java +++ b/source/src/main/java/org/cerberus/core/engine/execution/impl/ConditionService.java @@ -200,6 +200,34 @@ public AnswerItem evaluateCondition(String conditionOperator, String co mes = ans.getResultMessage(); break; + case CONDITIONOPERATOR_IFSTEPSTATUSOK: + ans = evaluateCondition_ifStepStatusOK(conditionValue1, execution); + mes = ans.getResultMessage(); + break; + + case CONDITIONOPERATOR_IFSTEPSTATUSNE: + ans = evaluateCondition_ifStepStatusNE(conditionValue1, execution); + mes = ans.getResultMessage(); + break; + case CONDITIONOPERATOR_IFACTIONSTATUSOK: + ans = evaluateCondition_ifActionStatusOK(conditionValue1, conditionValue2, execution); + mes = ans.getResultMessage(); + break; + + case CONDITIONOPERATOR_IFACTIONSTATUSNE: + ans = evaluateCondition_ifActionStatusNE(conditionValue1, conditionValue2, execution); + mes = ans.getResultMessage(); + break; + case CONDITIONOPERATOR_IFCONTROLSTATUSOK: + ans = evaluateCondition_ifControlStatusOK(conditionValue1, conditionValue2, conditionValue3, execution); + mes = ans.getResultMessage(); + break; + + case CONDITIONOPERATOR_IFCONTROLSTATUSNE: + ans = evaluateCondition_ifControlStatusNE(conditionValue1, conditionValue2, conditionValue3, execution); + mes = ans.getResultMessage(); + break; + default: mes = new MessageEvent(MessageEventEnum.CONDITIONEVAL_FAILED_UNKNOWNCONDITION); mes.setDescription(mes.getDescription().replace("%COND%", conditionToEvaluate.getCondition())); @@ -264,6 +292,8 @@ public String cleanValue3(String condition, String value3) { case CONDITIONOPERATOR_IFSTRINGNOTCONTAINS: case CONDITIONOPERATOR_IFTEXTINELEMENT: case CONDITIONOPERATOR_IFTEXTNOTINELEMENT: + case CONDITIONOPERATOR_IFCONTROLSTATUSOK: + case CONDITIONOPERATOR_IFCONTROLSTATUSNE: return value3; default: return ""; @@ -1059,6 +1089,215 @@ private AnswerItem evaluateCondition_ifNumericXXX(String conditionOpera return ans; } + private AnswerItem evaluateCondition_ifStepStatusOK(String conditionValue1, TestCaseExecution execution) { + LOG.debug("Checking if Step Status OK"); + AnswerItem ans = new AnswerItem<>(); + MessageEvent mes; + + try { + + String status = execution.getTestCaseStepExecutionByStepId(Integer.valueOf(conditionValue1)).getReturnCode(); + + + if (status.equals("OK")) { + mes = new MessageEvent(MessageEventEnum.CONDITIONEVAL_TRUE_STEPEXECUTIONOK); + mes.setDescription(mes.getDescription() + .replace("%STR1%", conditionValue1) + ); + } else { + mes = new MessageEvent(MessageEventEnum.CONDITIONEVAL_FALSE_STEPEXECUTIONOK); + mes.setDescription(mes.getDescription() + .replace("%STR1%", conditionValue1) + ); + } + + } catch (Exception ex){ + mes = new MessageEvent(MessageEventEnum.CONDITIONEVAL_FAILED_STEPEXECUTIONOK); + mes.setDescription(mes.getDescription() + .replace("%STR1%", conditionValue1) + ); + } + ans.setResultMessage(mes); + return ans; + } + + private AnswerItem evaluateCondition_ifStepStatusNE(String conditionValue1, TestCaseExecution execution) { + LOG.debug("Checking if Step Status NE"); + AnswerItem ans = new AnswerItem<>(); + MessageEvent mes; + + try { + String status = execution.getTestCaseStepExecutionByStepId(Integer.valueOf(conditionValue1)).getReturnCode(); + + + if (status.equals("NE")) { + mes = new MessageEvent(MessageEventEnum.CONDITIONEVAL_TRUE_STEPEXECUTIONNE); + mes.setDescription(mes.getDescription() + .replace("%STR1%", conditionValue1) + ); + } else { + mes = new MessageEvent(MessageEventEnum.CONDITIONEVAL_FALSE_STEPEXECUTIONNE); + mes.setDescription(mes.getDescription() + .replace("%STR1%", conditionValue1) + ); + } + } catch (Exception ex){ + mes = new MessageEvent(MessageEventEnum.CONDITIONEVAL_FAILED_STEPEXECUTIONNE); + mes.setDescription(mes.getDescription() + .replace("%STR1%", conditionValue1) + ); + } + ans.setResultMessage(mes); + return ans; + } + + private AnswerItem evaluateCondition_ifActionStatusOK(String conditionValue1, String conditionValue2, TestCaseExecution execution) { + LOG.debug("Checking if Action Status OK"); + AnswerItem ans = new AnswerItem<>(); + MessageEvent mes; + + try { + String status = execution.getTestCaseStepExecutionByStepId(Integer.valueOf(conditionValue1)) + .getTestCaseStepActionExecutionByActionId(Integer.valueOf(conditionValue2)) + .getReturnCode(); + + + if (status.equals("OK")) { + mes = new MessageEvent(MessageEventEnum.CONDITIONEVAL_TRUE_ACTIONEXECUTIONOK); + mes.setDescription(mes.getDescription() + .replace("%STR1%", conditionValue1) + .replace("%STR2%", conditionValue2) + ); + } else { + mes = new MessageEvent(MessageEventEnum.CONDITIONEVAL_FALSE_ACTIONEXECUTIONOK); + mes.setDescription(mes.getDescription() + .replace("%STR1%", conditionValue1) + .replace("%STR2%", conditionValue2) + ); + } + } catch (Exception ex){ + mes = new MessageEvent(MessageEventEnum.CONDITIONEVAL_FAILED_ACTIONEXECUTIONOK); + mes.setDescription(mes.getDescription() + .replace("%STR1%", conditionValue1) + .replace("%STR2%", conditionValue2) + ); + } + ans.setResultMessage(mes); + return ans; + } + + private AnswerItem evaluateCondition_ifActionStatusNE(String conditionValue1, String conditionValue2, TestCaseExecution execution) { + LOG.debug("Checking if Action Status NE"); + AnswerItem ans = new AnswerItem<>(); + MessageEvent mes; + + try { + String status = execution.getTestCaseStepExecutionByStepId(Integer.valueOf(conditionValue1)) + .getTestCaseStepActionExecutionByActionId(Integer.valueOf(conditionValue2)) + .getReturnCode(); + + + if (status.equals("NE")) { + mes = new MessageEvent(MessageEventEnum.CONDITIONEVAL_TRUE_ACTIONEXECUTIONNE); + mes.setDescription(mes.getDescription() + .replace("%STR1%", conditionValue1) + .replace("%STR2%", conditionValue2) + ); + } else { + mes = new MessageEvent(MessageEventEnum.CONDITIONEVAL_FALSE_ACTIONEXECUTIONNE); + mes.setDescription(mes.getDescription() + .replace("%STR1%", conditionValue1) + .replace("%STR2%", conditionValue2) + ); + } + } catch (Exception ex){ + mes = new MessageEvent(MessageEventEnum.CONDITIONEVAL_FAILED_ACTIONEXECUTIONNE); + mes.setDescription(mes.getDescription() + .replace("%STR1%", conditionValue1) + .replace("%STR2%", conditionValue2) + ); + } + ans.setResultMessage(mes); + return ans; + } + + private AnswerItem evaluateCondition_ifControlStatusOK(String conditionValue1, String conditionValue2, String conditionValue3, TestCaseExecution execution) { + LOG.debug("Checking if Control Status OK"); + AnswerItem ans = new AnswerItem<>(); + MessageEvent mes; + + try { + String status = execution.getTestCaseStepExecutionByStepId(Integer.valueOf(conditionValue1)) + .getTestCaseStepActionExecutionByActionId(Integer.valueOf(conditionValue2)) + .getTestCaseStepActionControlExecutionByControlId(Integer.valueOf(conditionValue3)) + .getReturnCode(); + + if (status.equals("OK")) { + mes = new MessageEvent(MessageEventEnum.CONDITIONEVAL_TRUE_CONTROLEXECUTIONOK); + mes.setDescription(mes.getDescription() + .replace("%STR1%", conditionValue1) + .replace("%STR2%", conditionValue2) + .replace("%STR3%", conditionValue3) + ); + } else { + mes = new MessageEvent(MessageEventEnum.CONDITIONEVAL_FALSE_CONTROLEXECUTIONOK); + mes.setDescription(mes.getDescription() + .replace("%STR1%", conditionValue1) + .replace("%STR2%", conditionValue2) + .replace("%STR3%", conditionValue3) + ); + } + } catch (Exception ex){ + mes = new MessageEvent(MessageEventEnum.CONDITIONEVAL_FAILED_CONTROLEXECUTIONOK); + mes.setDescription(mes.getDescription() + .replace("%STR1%", conditionValue1) + .replace("%STR2%", conditionValue2) + .replace("%STR3%", conditionValue3) + ); + } + ans.setResultMessage(mes); + return ans; + } + + private AnswerItem evaluateCondition_ifControlStatusNE(String conditionValue1, String conditionValue2, String conditionValue3, TestCaseExecution execution) { + LOG.debug("Checking if Control Status NE"); + AnswerItem ans = new AnswerItem<>(); + MessageEvent mes; + + try { + String status = execution.getTestCaseStepExecutionByStepId(Integer.valueOf(conditionValue1)) + .getTestCaseStepActionExecutionByActionId(Integer.valueOf(conditionValue2)) + .getTestCaseStepActionControlExecutionByControlId(Integer.valueOf(conditionValue3)) + .getReturnCode(); + + + if (status.equals("NE")) { + mes = new MessageEvent(MessageEventEnum.CONDITIONEVAL_TRUE_CONTROLEXECUTIONNE); + mes.setDescription(mes.getDescription() + .replace("%STR1%", conditionValue1) + .replace("%STR2%", conditionValue2) + .replace("%STR3%", conditionValue3) + ); + } else { + mes = new MessageEvent(MessageEventEnum.CONDITIONEVAL_FALSE_CONTROLEXECUTIONNE); + mes.setDescription(mes.getDescription() + .replace("%STR1%", conditionValue1) + .replace("%STR2%", conditionValue2) + .replace("%STR3%", conditionValue3) + ); + } + } catch (Exception ex){ + mes = new MessageEvent(MessageEventEnum.CONDITIONEVAL_FAILED_CONTROLEXECUTIONNE); + mes.setDescription(mes.getDescription() + .replace("%STR1%", conditionValue1) + .replace("%STR2%", conditionValue2) + .replace("%STR3%", conditionValue3) + ); + } + ans.setResultMessage(mes); + return ans; + } + private String caseSensitiveMessageValue(String isCaseSensitive) { if (ParameterParserUtil.parseBooleanParam(isCaseSensitive, false)) { diff --git a/source/src/main/java/org/cerberus/core/engine/execution/impl/ExecutionRunService.java b/source/src/main/java/org/cerberus/core/engine/execution/impl/ExecutionRunService.java index 632515f87b..d40617218f 100644 --- a/source/src/main/java/org/cerberus/core/engine/execution/impl/ExecutionRunService.java +++ b/source/src/main/java/org/cerberus/core/engine/execution/impl/ExecutionRunService.java @@ -1313,6 +1313,7 @@ private TestCaseStepActionExecution executeAction(TestCaseStepActionExecution ac controlExecution.setDoScreenshotAfter(control.isDoScreenshotAfter()); controlExecution.setWaitBefore(control.getWaitBefore()); controlExecution.setWaitAfter(control.getWaitAfter()); + controlExecution.setTestCaseStepActionControl(control); this.testCaseStepActionControlExecutionService.insertTestCaseStepActionControlExecution(controlExecution, execution.getSecrets()); diff --git a/source/src/main/java/org/cerberus/core/engine/execution/impl/IdentifierService.java b/source/src/main/java/org/cerberus/core/engine/execution/impl/IdentifierService.java index e570ab7bd0..a9f6f17268 100644 --- a/source/src/main/java/org/cerberus/core/engine/execution/impl/IdentifierService.java +++ b/source/src/main/java/org/cerberus/core/engine/execution/impl/IdentifierService.java @@ -71,7 +71,7 @@ private Identifier getIdentifier(String input, String defaultIdentifier) { Identifier.IDENTIFIER_CLASS, Identifier.IDENTIFIER_CSS, Identifier.IDENTIFIER_LINK,Identifier.IDENTIFIER_DATACERBERUS, Identifier.IDENTIFIER_QUERYSELECTOR, Identifier.IDENTIFIER_ERRATUM, Identifier.IDENTIFIER_PICTURE, Identifier.IDENTIFIER_TEXT, - Identifier.IDENTIFIER_COORD, + Identifier.IDENTIFIER_COORD, Identifier.IDENTIFIER_OFFSET, Identifier.IDENTIFIER_TITLE, Identifier.IDENTIFIER_REGEXTITLE, Identifier.IDENTIFIER_URL, Identifier.IDENTIFIER_REGEXURL, Identifier.IDENTIFIER_VALUE, Identifier.IDENTIFIER_REGEXVALUE, Identifier.IDENTIFIER_INDEX, Identifier.IDENTIFIER_REGEXINDEX, @@ -107,7 +107,7 @@ public void checkSelectOptionsIdentifier(String identifier) throws CerberusEvent public void checkWebElementIdentifier(String identifier) throws CerberusEventException { String[] selectOptionAttributes = {Identifier.IDENTIFIER_ID, Identifier.IDENTIFIER_NAME, Identifier.IDENTIFIER_CLASS, Identifier.IDENTIFIER_CSS, Identifier.IDENTIFIER_XPATH, Identifier.IDENTIFIER_LINK, Identifier.IDENTIFIER_DATACERBERUS, Identifier.IDENTIFIER_COORD, Identifier.IDENTIFIER_PICTURE, - Identifier.IDENTIFIER_QUERYSELECTOR, Identifier.IDENTIFIER_ERRATUM}; + Identifier.IDENTIFIER_QUERYSELECTOR, Identifier.IDENTIFIER_ERRATUM, Identifier.IDENTIFIER_OFFSET,}; if (!Arrays.asList(selectOptionAttributes).contains(identifier)) { MessageEvent message = new MessageEvent(MessageEventEnum.ACTION_FAILED_UNKOWN_IDENTIFIER_SELENIUM); diff --git a/source/src/main/java/org/cerberus/core/engine/execution/impl/RobotServerService.java b/source/src/main/java/org/cerberus/core/engine/execution/impl/RobotServerService.java index 2fc2c067ef..04eca59048 100644 --- a/source/src/main/java/org/cerberus/core/engine/execution/impl/RobotServerService.java +++ b/source/src/main/java/org/cerberus/core/engine/execution/impl/RobotServerService.java @@ -1289,7 +1289,7 @@ public void setOptionsTimeout(Session session, Integer timeout) { LOG.debug(session.getDriver()); LOG.debug(session.getCerberus_selenium_pageLoadTimeout()); LOG.debug(timeout); - if ((session.getDriver() != null) && (session.getCerberus_selenium_pageLoadTimeout() != timeout)) { + if ((session.getDriver() != null) && (session.getAppiumDriver() == null) && (session.getCerberus_selenium_pageLoadTimeout() != timeout)) { LOG.debug("Setting Selenium Robot Options (pageLoadTimeout & setScriptTimeout) timeout to : {}", timeout); WebDriver driver = session.getDriver(); driver.manage().timeouts().pageLoadTimeout(timeout, TimeUnit.MILLISECONDS); @@ -1344,12 +1344,12 @@ public void setOptionsToDefault(Session session) { session.setCerberus_sikuli_wait_element(session.getCerberus_sikuli_wait_element_default()); WebDriver driver = session.getDriver(); - if ((driver != null) && (session.getCerberus_selenium_pageLoadTimeout() != session.getCerberus_selenium_pageLoadTimeout_default())) { + if ((driver != null) && (session.getAppiumDriver() == null) && (session.getCerberus_selenium_pageLoadTimeout() != session.getCerberus_selenium_pageLoadTimeout_default())) { LOG.debug("Setting Selenium Robot Options (pageLoadTimeout) timeout to : {}", session.getCerberus_selenium_pageLoadTimeout_default()); driver.manage().timeouts().pageLoadTimeout(session.getCerberus_selenium_pageLoadTimeout_default(), TimeUnit.MILLISECONDS); session.setCerberus_selenium_pageLoadTimeout(session.getCerberus_selenium_pageLoadTimeout_default()); } - if ((driver != null) && (session.getCerberus_selenium_setScriptTimeout() != session.getCerberus_selenium_setScriptTimeout_default())) { + if ((driver != null) && (session.getAppiumDriver() == null) && (session.getCerberus_selenium_setScriptTimeout() != session.getCerberus_selenium_setScriptTimeout_default())) { LOG.debug("Setting Selenium Robot Options (setScriptTimeout) timeout to : {}", session.getCerberus_selenium_setScriptTimeout_default()); driver.manage().timeouts().setScriptTimeout(session.getCerberus_selenium_setScriptTimeout_default(), TimeUnit.MILLISECONDS); session.setCerberus_selenium_setScriptTimeout(session.getCerberus_selenium_setScriptTimeout_default()); diff --git a/source/src/main/java/org/cerberus/core/engine/gwt/impl/ActionService.java b/source/src/main/java/org/cerberus/core/engine/gwt/impl/ActionService.java index 931a03e1d1..7b870076fe 100644 --- a/source/src/main/java/org/cerberus/core/engine/gwt/impl/ActionService.java +++ b/source/src/main/java/org/cerberus/core/engine/gwt/impl/ActionService.java @@ -1826,7 +1826,11 @@ public MessageEvent doActionDragAndDrop(TestCaseExecution tCExecution, String va && identifierDrop.getIdentifier().equals(SikuliService.SIKULI_IDENTIFIER_PICTURE)) { return sikuliService.doSikuliActionDragAndDrop(tCExecution.getSession(), identifierDrag, identifierDrop); } else { - return webdriverService.doSeleniumActionDragAndDrop(tCExecution.getSession(), identifierDrag, identifierDrop, true, true); + if (Identifier.IDENTIFIER_OFFSET.equals(identifierDrop.getIdentifier())) { + return webdriverService.doSeleniumActionDragAndDropByOffset(tCExecution.getSession(), identifierDrag, identifierDrop, true, true); + } else { + return webdriverService.doSeleniumActionDragAndDrop(tCExecution.getSession(), identifierDrag, identifierDrop, true, true); + } } } if (tCExecution.getApplicationObj().getType().equalsIgnoreCase(Application.TYPE_FAT)) { diff --git a/source/src/main/java/org/cerberus/core/enums/MessageEventEnum.java b/source/src/main/java/org/cerberus/core/enums/MessageEventEnum.java index a0a922570d..927b323dfc 100644 --- a/source/src/main/java/org/cerberus/core/enums/MessageEventEnum.java +++ b/source/src/main/java/org/cerberus/core/enums/MessageEventEnum.java @@ -349,6 +349,7 @@ public enum MessageEventEnum { ACTION_FAILED_CLEARFIELD(257, "FA", "Value1 is ‘null’. Parameter is mandatory in order to perform the action clearField.", true, true, true, MessageGeneralEnum.EXECUTION_FA_ACTION), ACTION_PENDING(299, "PE", "Doing Action...", false, false, false, MessageGeneralEnum.EXECUTION_PE_TESTSTARTED), ACTION_FAILED_DRAGANDDROP_NO_SUCH_ELEMENT(299, "FA", "Failed to dragAndDrop because could not find element '%ELEMENT%'!", true, true, true, MessageGeneralEnum.EXECUTION_FA_ACTION), + ACTION_FAILED_DRAGANDDROP_INVALID_FORMAT(299, "FA", "Failed to dragAndDrop because of the value of the offset '%OFFSET%'! It must be offset=integer;integer", true, true, true, MessageGeneralEnum.EXECUTION_FA_ACTION), ACTION_FAILED_DRAGANDDROPSIKULI_NO_SUCH_ELEMENT(299, "FA", "Failed to dragAndDrop because could not find an element!", true, true, true, MessageGeneralEnum.EXECUTION_FA_ACTION), ACTION_WAITINGFORMANUALEXECUTION(240, "WE", "", false, false, false, MessageGeneralEnum.EXECUTION_PE_TESTSTARTED), ACTION_FAILED_CLEAR_NO_SUCH_ELEMENT(267, "FA", "Failed to long clicked because could not find element '%ELEMENT%'!", true, true, true, MessageGeneralEnum.EXECUTION_FA_ACTION), @@ -504,6 +505,12 @@ public enum MessageEventEnum { CONDITIONEVAL_FAILED_NOTSUPPORTED_FOR_APPLICATION(1220, "FA", "Condition '%CONDITION%' is not supported for application type '%APPLICATIONTYPE%'.", false, false, false, MessageGeneralEnum.EXECUTION_FA_CONDITION), CONDITIONEVAL_FAILED_NOTSUPPORTED_FOR_MESSAGETYPE(1220, "FA", "Message type %TYPE% not supported for condition '%CONDITION%'.", false, false, false, MessageGeneralEnum.EXECUTION_FA_CONDITION), CONDITIONEVAL_FAILED_IFNUMERIC_GENERICCONVERSIONERROR(1230, "FA", "Cannot convert %STRINGVALUE% to numeric.", false, false, false, MessageGeneralEnum.EXECUTION_FA_CONDITION), + CONDITIONEVAL_FAILED_STEPEXECUTIONOK(1210, "FA", "Mandatory parameter '%STR1%' is missing or in a bad format (integer expected), or expected step doesn't exist.", false, false, false, MessageGeneralEnum.EXECUTION_FA_CONDITION), + CONDITIONEVAL_FAILED_ACTIONEXECUTIONOK(1210, "FA", "Mandatory parameter '%STR1%' or '%STR2%' is missing or in a bad format (integer expected), or expected step doesn't exist.", false, false, false, MessageGeneralEnum.EXECUTION_FA_CONDITION), + CONDITIONEVAL_FAILED_CONTROLEXECUTIONOK(1210, "FA", "Mandatory parameter '%STR1%', '%STR2%' or '%STR3%' is missing or in a bad format (integer expected), or expected step/action doesn't exist.", false, false, false, MessageGeneralEnum.EXECUTION_FA_CONDITION), + CONDITIONEVAL_FAILED_STEPEXECUTIONNE(1210, "FA", "Mandatory parameter '%STR1%' is missing or in a bad format (integer expected), or expected step doesn't exist.", false, false, false, MessageGeneralEnum.EXECUTION_FA_CONDITION), + CONDITIONEVAL_FAILED_ACTIONEXECUTIONNE(1210, "FA", "Mandatory parameter '%STR1%' or '%STR2%' is missing or in a bad format (integer expected), or expected step doesn't exist.", false, false, false, MessageGeneralEnum.EXECUTION_FA_CONDITION), + CONDITIONEVAL_FAILED_CONTROLEXECUTIONNE(1210, "FA", "Mandatory parameter '%STR1%', '%STR2%' or '%STR3%' is missing or in a bad format (integer expected), or expected step/action doesn't exist.", false, false, false, MessageGeneralEnum.EXECUTION_FA_CONDITION), CONDITIONEVAL_FAILED_SELENIUM_CONNECTIVITY(1230, "FA", "Lost connection to Selenium Server! Detailed error : %ERROR%.", false, false, false, MessageGeneralEnum.EXECUTION_FA_CONDITION), CONDITIONEVAL_FAILED_GENERIC(1230, "FA", "Failed to evaluate condition. Detailed error : %ERROR%.", false, false, false, MessageGeneralEnum.EXECUTION_FA_CONDITION), CONDITIONEVAL_FAILED_TEXTINELEMENT(1240, "FA", "%ERRORMESS%", true, true, true, MessageGeneralEnum.EXECUTION_KO), @@ -527,6 +534,12 @@ public enum MessageEventEnum { CONDITIONEVAL_FALSE_NUMERICGREATEROREQUAL(1210, "NA", "'%STR1%' is not greater or equal than '%STR2%'", false, false, false, MessageGeneralEnum.EXECUTION_PE_TESTSTARTED), CONDITIONEVAL_FALSE_NUMERICMINOR(1210, "NA", "'%STR1%' is not minor to '%STR2%'", false, false, false, MessageGeneralEnum.EXECUTION_PE_TESTSTARTED), CONDITIONEVAL_FALSE_NUMERICMINOROREQUAL(1210, "NA", "'%STR1%' is not minor or equal to '%STR2%'", false, false, false, MessageGeneralEnum.EXECUTION_PE_TESTSTARTED), + CONDITIONEVAL_FALSE_STEPEXECUTIONOK(1210, "NA", "Step '%STR1%' has not been executed but expected.", false, false, false, MessageGeneralEnum.EXECUTION_PE_TESTSTARTED), + CONDITIONEVAL_FALSE_ACTIONEXECUTIONOK(1210, "NA", "Action '%STR1%' from Step '%STR2%' has not been executed but expected.", false, false, false, MessageGeneralEnum.EXECUTION_PE_TESTSTARTED), + CONDITIONEVAL_FALSE_CONTROLEXECUTIONOK(1210, "NA", "Control '%STR1%' from Action '%STR2%' from Step '%STR3%' has not been executed but expected.", false, false, false, MessageGeneralEnum.EXECUTION_PE_TESTSTARTED), + CONDITIONEVAL_FALSE_STEPEXECUTIONNE(1210, "NA", "Step '%STR1%' has been executed but it should not.", false, false, false, MessageGeneralEnum.EXECUTION_PE_TESTSTARTED), + CONDITIONEVAL_FALSE_ACTIONEXECUTIONNE(1210, "NA", "Action '%STR1%' from Step '%STR2%' has been executed but it should not.", false, false, false, MessageGeneralEnum.EXECUTION_PE_TESTSTARTED), + CONDITIONEVAL_FALSE_CONTROLEXECUTIONNE(1210, "NA", "Control '%STR1%' from Action '%STR2%' from Step '%STR3%' has been executed but it should not.", false, false, false, MessageGeneralEnum.EXECUTION_PE_TESTSTARTED), CONDITIONEVAL_FALSE_TEXTINELEMENT(1240, "NA", "%ERRORMESS%", false, false, false, MessageGeneralEnum.EXECUTION_PE_TESTSTARTED), CONDITIONEVAL_FALSE_TEXTNOTINELEMENT(1240, "NA", "%ERRORMESS%", false, false, false, MessageGeneralEnum.EXECUTION_PE_TESTSTARTED), CONDITIONEVAL_TRUE_ALWAYS(1210, "OK", "", false, false, false, MessageGeneralEnum.EXECUTION_PE_TESTSTARTED), @@ -552,6 +565,12 @@ public enum MessageEventEnum { CONDITIONEVAL_TRUE_NUMERICGREATEROREQUAL(1210, "OK", "'%STR1%' is greater or equal than '%STR2%'", false, false, false, MessageGeneralEnum.EXECUTION_PE_TESTSTARTED), CONDITIONEVAL_TRUE_NUMERICMINOR(1210, "OK", "'%STR1%' is minor to '%STR2%'", false, false, false, MessageGeneralEnum.EXECUTION_PE_TESTSTARTED), CONDITIONEVAL_TRUE_NUMERICMINOROREQUAL(1210, "OK", "'%STR1%' is minor or equal to '%STR2%'", false, false, false, MessageGeneralEnum.EXECUTION_PE_TESTSTARTED), + CONDITIONEVAL_TRUE_STEPEXECUTIONOK(1210, "OK", "Step '%STR1%' has been executed and returned OK.", false, false, false, MessageGeneralEnum.EXECUTION_PE_TESTSTARTED), + CONDITIONEVAL_TRUE_ACTIONEXECUTIONOK(1210, "OK", "Action '%STR1%' from Step '%STR2%' has been executed and returned OK.", false, false, false, MessageGeneralEnum.EXECUTION_PE_TESTSTARTED), + CONDITIONEVAL_TRUE_CONTROLEXECUTIONOK(1210, "OK", "Control '%STR1%' from Action '%STR2%' from Step '%STR3%' has been executed and returned OK.", false, false, false, MessageGeneralEnum.EXECUTION_PE_TESTSTARTED), + CONDITIONEVAL_TRUE_STEPEXECUTIONNE(1210, "OK", "Step '%STR1%' has not been executed.", false, false, false, MessageGeneralEnum.EXECUTION_PE_TESTSTARTED), + CONDITIONEVAL_TRUE_ACTIONEXECUTIONNE(1210, "OK", "Action '%STR1%' from Step '%STR2%' has not been executed.", false, false, false, MessageGeneralEnum.EXECUTION_PE_TESTSTARTED), + CONDITIONEVAL_TRUE_CONTROLEXECUTIONNE(1210, "OK", "Control '%STR1%' from Action '%STR2%' from Step '%STR3%' has not been executed.", false, false, false, MessageGeneralEnum.EXECUTION_PE_TESTSTARTED), CONDITIONEVAL_TRUE_TEXTINELEMENT(300, "OK", "Element '%STRING1%' with value '%STRING2%' is equal to %STRING3%, %STRING4%.", false, false, false, MessageGeneralEnum.EXECUTION_PE_TESTSTARTED), CONDITIONEVAL_TRUEMANUAL_TEXTINELEMENT(300, "OK", "Please evaluate if element '%STRING1%' does contain '%STRING2%', case sensitive : '%STRING3%'.", false, false, false, MessageGeneralEnum.EXECUTION_PE_TESTSTARTED), CONDITIONEVAL_TRUE_TEXTNOTINELEMENT(300, "OK", "Element '%STRING1%' with value '%STRING2%' is different than %STRING3%, %STRING4%.", false, false, false, MessageGeneralEnum.EXECUTION_PE_TESTSTARTED), diff --git a/source/src/main/java/org/cerberus/core/service/webdriver/IWebDriverService.java b/source/src/main/java/org/cerberus/core/service/webdriver/IWebDriverService.java index b7cf6b9e9b..c3736ae48e 100644 --- a/source/src/main/java/org/cerberus/core/service/webdriver/IWebDriverService.java +++ b/source/src/main/java/org/cerberus/core/service/webdriver/IWebDriverService.java @@ -139,5 +139,7 @@ public interface IWebDriverService { MessageEvent doSeleniumActionDragAndDrop(Session session, Identifier object, Identifier property, boolean waitForVisibility, boolean waitForClickability) throws IOException; + MessageEvent doSeleniumActionDragAndDropByOffset(Session session, Identifier object, Identifier offset, boolean waitForVisibility, boolean waitForClickability) throws IOException; + MessageEvent doSeleniumActionRefreshCurrentPage(Session session); } diff --git a/source/src/main/java/org/cerberus/core/service/webdriver/impl/WebDriverService.java b/source/src/main/java/org/cerberus/core/service/webdriver/impl/WebDriverService.java index 51f2eaa453..b5d99fcbbe 100644 --- a/source/src/main/java/org/cerberus/core/service/webdriver/impl/WebDriverService.java +++ b/source/src/main/java/org/cerberus/core/service/webdriver/impl/WebDriverService.java @@ -1564,6 +1564,53 @@ public MessageEvent doSeleniumActionDragAndDrop(Session session, Identifier drag } } + @Override + public MessageEvent doSeleniumActionDragAndDropByOffset(Session session, Identifier drag, Identifier offset, boolean waitForVisibility, boolean waitForClickability) throws IOException { + MessageEvent message; + try { + AnswerItem answerDrag = this.getSeleniumElement(session, drag, waitForVisibility, waitForClickability); + String[] offsetCoords = offset.getLocator().split(";"); + + int xOff = Integer.parseInt(offsetCoords[0]); + int yOff = Integer.parseInt(offsetCoords[1]); + + if (answerDrag.isCodeEquals(MessageEventEnum.ACTION_SUCCESS_WAIT_ELEMENT.getCode())) { + WebElement source = (WebElement) answerDrag.getItem(); + + Actions builder = new Actions(session.getDriver()); + Action dragAndDrop = builder.clickAndHold(source) + .moveToElement(source, xOff, yOff) + .release() + .build(); + dragAndDrop.perform(); + + message = new MessageEvent(MessageEventEnum.ACTION_SUCCESS_DRAGANDDROP); + message.setDescription(message.getDescription().replace("%SOURCE%", drag.getIdentifier() + "=" + drag.getLocator())); + message.setDescription(message.getDescription().replace("%TARGET%", offset.getIdentifier() + "=" + offset.getLocator())); + return message; + } else { + message = new MessageEvent(MessageEventEnum.ACTION_FAILED_DRAGANDDROP_NO_SUCH_ELEMENT); + message.setDescription(message.getDescription().replace("%ELEMENT%", drag.getIdentifier() + "=" + drag.getLocator())); + return message; + } + } catch (NoSuchElementException exception) { + message = new MessageEvent(MessageEventEnum.ACTION_FAILED_DRAGANDDROP_NO_SUCH_ELEMENT); + message.setDescription(message.getDescription().replace("%ELEMENT%", drag.getIdentifier() + "=" + drag.getLocator())); + LOG.debug(exception.toString()); + return message; + } catch (TimeoutException exception) { + message = new MessageEvent(MessageEventEnum.ACTION_FAILED_TIMEOUT); + message.setDescription(message.getDescription().replace("%TIMEOUT%", String.valueOf(session.getCerberus_selenium_wait_element()))); + LOG.warn(exception.toString()); + return message; + } catch (NumberFormatException exception) { + message = new MessageEvent(MessageEventEnum.ACTION_FAILED_DRAGANDDROP_INVALID_FORMAT); + message.setDescription(message.getDescription().replace("%OFFSET%", offset.getIdentifier() + "=" + offset.getLocator())); + LOG.debug(exception.toString()); + return message; + } + } + private void selectRequestedOption(Select select, Identifier property, String element) throws CerberusEventException { MessageEvent message; try { diff --git a/source/src/main/webapp/include/pages/testcasescript/manageActionControlOptions.html b/source/src/main/webapp/include/pages/testcasescript/manageActionControlOptions.html index f49e960ea6..5d62205936 100644 --- a/source/src/main/webapp/include/pages/testcasescript/manageActionControlOptions.html +++ b/source/src/main/webapp/include/pages/testcasescript/manageActionControlOptions.html @@ -122,6 +122,10 @@ +
+ + +
diff --git a/source/src/main/webapp/include/pages/testcasescript/manageStepOptions.html b/source/src/main/webapp/include/pages/testcasescript/manageStepOptions.html index dd2922266c..7652b1b032 100644 --- a/source/src/main/webapp/include/pages/testcasescript/manageStepOptions.html +++ b/source/src/main/webapp/include/pages/testcasescript/manageStepOptions.html @@ -52,6 +52,10 @@ +
+ + +
diff --git a/source/src/main/webapp/js/global/autocomplete.js b/source/src/main/webapp/js/global/autocomplete.js index efb9ee1f7e..91c37ad15e 100644 --- a/source/src/main/webapp/js/global/autocomplete.js +++ b/source/src/main/webapp/js/global/autocomplete.js @@ -355,7 +355,8 @@ function initTags(configs, context) { "erratum", "picture", "text", - "coord" + "coord", + "offset" ]; var availableIdentifiersSwitch = [ "title", diff --git a/source/src/main/webapp/js/pages/TestCaseScript.js b/source/src/main/webapp/js/pages/TestCaseScript.js index c4fc0ad64c..859458c792 100644 --- a/source/src/main/webapp/js/pages/TestCaseScript.js +++ b/source/src/main/webapp/js/pages/TestCaseScript.js @@ -1470,6 +1470,47 @@ function duplicateStep(event) { } +function appendActionsForConditionCombobox(combo, operator){ + + combo.empty(); + var steps = $("#steps li").data("item").steps; + for (s in steps) { + if (operator.startsWith("ifStepStatus")) { + if (steps[s].sort != undefined) { + combo.append($("") + .text("Step " + steps[s].sort + " - " + steps[s].description) + .attr("stepId", steps[s].stepId) + .val(steps[s].stepId)); + } + } else { + var actions = $("#steps li").data("item").steps[s].actions; + for (a in actions) { + if (operator.startsWith("ifActionStatus")) { + if (actions[a].sort != undefined) { + combo.append($("") + .text("Step " + steps[s].sort + " - Action " + actions[a].sort + " - " + actions[a].description) + .attr("actionId", actions[a].actionId) + .attr("stepId", steps[s].stepId) + .val(steps[s].stepId + "-" + actions[a].actionId)); + } + } else { + var controls = $("#steps li").data("item").steps[s].actions[a].controls; + for (c in controls) { + if (controls[c].sort != undefined) { + combo.append($("") + .text("Step " + steps[s].sort + " - Action " + actions[a].sort + " - Control " + controls[c].sort + " - " + controls[c].description) + .attr("actionId", actions[a].actionId) + .attr("stepId", steps[s].stepId) + .attr("controlId", controls[c].controlId) + .val(steps[s].stepId + "-" + actions[a].actionId+ "-" + controls[c].controlId)); + } + } + } + } + } + } +} + function createSteps(data, steps, stepIndex, canUpdate, hasPermissionsStepLibrary) { // If the testcase has no steps, we create an empty one. if (data.length === 0) { @@ -2236,12 +2277,26 @@ function displayStepOptionsModal(step, htmlElement) { $("#stepConditionVal2").val(step.conditionValue2); $("#stepConditionVal3").val(step.conditionValue3); setPlaceholderCondition($("#stepConditionOperator")); + if (conditionNewUIList[step.conditionOperator].type ==="combo") { + appendActionsForConditionCombobox($("#stepconditionval4"), step.conditionOperator); + if (conditionNewUIList[step.conditionOperator].level ==="step"){ + $("#stepconditionval4").val(step.conditionValue1); + } + if (conditionNewUIList[step.conditionOperator].level ==="action"){ + $("#stepconditionval4").val(step.conditionValue1+"-"+step.conditionValue2); + } + if (conditionNewUIList[step.conditionOperator].level ==="control"){ + $("#stepconditionval4").val(step.conditionValue1+"-"+step.conditionValue2+"-"+step.conditionValue3); + } + } + //END OF CONDITION $("#stepConditionOperator").off("change"); $("#stepConditionOperator").on("change", function () { setModif(true); setPlaceholderCondition($(this)); + appendActionsForConditionCombobox($("#stepconditionval4"), $(this).val()); }); $("#stepConditionVal1").off("change"); $("#stepConditionVal1").on("change", function () { @@ -2311,6 +2366,11 @@ function displayStepOptionsModal(step, htmlElement) { step.conditionValue1 = $("#stepConditionVal1").val(); step.conditionValue2 = $("#stepConditionVal2").val(); step.conditionValue3 = $("#stepConditionVal3").val(); + if (conditionNewUIList[step.conditionOperator].type === "combo") { + step.conditionValue1 = $("#stepconditionval4 option:selected").attr("stepId"); + step.conditionValue2 = $("#stepconditionval4 option:selected").attr("actionId") === undefined ? "":$("#stepconditionval4 option:selected").attr("actionId"); + step.conditionValue3 = $("#stepconditionval4 option:selected").attr("controlId")=== undefined ? "":$("#stepconditionval4 option:selected").attr("controlId"); + } step.loop = $("#stepLoop").val(); @@ -2595,10 +2655,25 @@ function displayOverrideOptionsModal(action, htmlElement) { $("#actionconditionval3").val(action.conditionValue3); setPlaceholderCondition($("#conditionSelect")); + if (conditionNewUIList[action.conditionOperator].type ==="combo") { + appendActionsForConditionCombobox($("#actionconditionval4"), action.conditionOperator); + if (conditionNewUIList[action.conditionOperator].level ==="step"){ + $("#actionconditionval4").val(action.conditionValue1); + } + if (conditionNewUIList[action.conditionOperator].level ==="action"){ + $("#actionconditionval4").val(action.conditionValue1+"-"+action.conditionValue2); + } + if (conditionNewUIList[action.conditionOperator].level ==="control"){ + $("#actionconditionval4").val(action.conditionValue1+"-"+action.conditionValue2+"-"+action.conditionValue3); + } + } + + $("#conditionSelect").off("change"); $("#conditionSelect").on("change", function () { setModif(true); setPlaceholderCondition($(this)); + appendActionsForConditionCombobox($("#actionconditionval4"), $(this).val()); }); $("#actionconditionval1").off("change"); $("#actionconditionval1").on("change", function () { @@ -2612,6 +2687,10 @@ function displayOverrideOptionsModal(action, htmlElement) { $("#actionconditionval3").on("change", function () { setModif(true); }); + $("#actionconditionval4").off("change"); + $("#actionconditionval4").on("change", function () { + setModif(true); + }); $("#screenshotBCheckbox").off("change"); $("#screenshotBCheckbox").on("change", function () { setModif(true); @@ -2718,6 +2797,12 @@ function displayOverrideOptionsModal(action, htmlElement) { action.conditionValue2 = $("#actionconditionval2").val(); action.conditionValue3 = $("#actionconditionval3").val(); + if (conditionNewUIList[action.conditionOperator].type === "combo") { + action.conditionValue1 = $("#actionconditionval4 option:selected").attr("stepId"); + action.conditionValue2 = $("#actionconditionval4 option:selected").attr("actionId") === undefined ? "":$("#actionconditionval4 option:selected").attr("actionId"); + action.conditionValue3 = $("#actionconditionval4 option:selected").attr("controlId")=== undefined ? "":$("#actionconditionval4 option:selected").attr("controlId"); + } + let newOpts = []; newOpts.push({ "act": $("#timeoutAct").prop("checked"), @@ -3996,6 +4081,14 @@ function setPlaceholderCondition(conditionElement) { $(conditionElement).parents("div[class*='conditions']").find("label[class='conditionVal3Label']").parent().hide(); } + if (typeof placeHolders.field4 !== 'undefined') { + $(conditionElement).parents("div[class*='conditions']").find("label[class='conditionVal4Label']").parent().show(); + $(conditionElement).parents("div[class*='conditions']").find("label[class='conditionVal4Label']").text(placeHolders.field4.label[user.language]); + + } else { + $(conditionElement).parents("div[class*='conditions']").find(".v4").hide(); + } + } function setPlaceholderControl(control) { diff --git a/source/src/main/webapp/js/testcase/action.js b/source/src/main/webapp/js/testcase/action.js index 214ef63d3a..f5d471d55f 100644 --- a/source/src/main/webapp/js/testcase/action.js +++ b/source/src/main/webapp/js/testcase/action.js @@ -81,7 +81,7 @@ var actionOptList = { "field1":{"label":{"en": "Application name or path", "fr": "Nom ou chemin de l'application"},"picto":"images/action-mobile-application.png", "class": "col-lg-12 crb-autocomplete-variable"}}, "dragAndDrop":{"group":"mouse_action","value": "dragAndDrop","label":{"en":"Drag And Drop","fr":"Glisser Déposer"},"application_types":["GUI","FAT"], "field1":{"label":{"en": "Element path", "fr": "Chemin de l'élement"},"picto":"images/action-html.png", "class": "col-lg-12 crb-autocomplete-element crb-contextual-button"}, - "field2":{"label":{"en":"Destination Element Path","fr":"Destination de l'élément"},"picto":"images/action-html.png", "class": "col-lg-12 crb-autocomplete-element crb-contextual-button"},"documentation":{"en":"...","fr":"..."}}, + "field2":{"label":{"en":"Destination Element Path or offset (offset=xx;yy)","fr":"Destination de l'élément ou offset (offset=xx;yy)"},"picto":"images/action-html.png", "class": "col-lg-12 crb-autocomplete-element crb-contextual-button"},"documentation":{"en":"...","fr":"..."}}, "select":{"group":"mouse_action","value": "select","label":{"en":"Choose option in select box","fr":"Choisir une option dans un Select"},"application_types":["GUI"], "field1":{"label":{"en": "Element path", "fr": "Chemin vers l'élement"},"picto":"images/action-html.png", "class": "col-lg-12 crb-autocomplete-element crb-contextual-button"}, "field2":{"label":{"en":"Option value","fr":"Chemin vers l'option"},"picto":"images/action-command-line.png", "class": "col-lg-12 crb-autocomplete-select"},"documentation":{"en":"...","fr":"..."}}, diff --git a/source/src/main/webapp/js/testcase/condition.js b/source/src/main/webapp/js/testcase/condition.js index 979124b6f6..e5ee036f11 100644 --- a/source/src/main/webapp/js/testcase/condition.js +++ b/source/src/main/webapp/js/testcase/condition.js @@ -77,6 +77,18 @@ var conditionNewUIList = { "ifStringNotContains":{"value":"ifStringNotContains","label":{"en":"If String not Contains","fr":"Si le texte ne contient pas"}, "field1":{"label":{"en": "String 1", "fr": "Texte 1"},"class": "crb-autocomplete-variable"}, "field2":{"label":{"en": "String 2", "fr": "Texte 2"},"class": "crb-autocomplete-variable"}}, + "ifStepStatusOK":{"value":"ifStepStatusOK","label":{"en":"If step returned OK","fr":"Si le step est OK'"}, + "field4":{"label":{"en": "Step", "fr": "Step"}},"type":"combo","level":"step"}, + "ifStepStatusNE":{"value":"ifStepStatusNE","label":{"en":"If defined step not executed","fr":"Si le step n'a pas été executé'"}, + "field4":{"label":{"en": "Step", "fr": "Step"}},"type":"combo","level":"step"}, + "ifActionStatusOK":{"value":"ifActionStatusOK","label":{"en":"If action returned OK","fr":"Si l'action est OK'"}, + "field4":{"label":{"en": "Action", "fr": "Action"}},"type":"combo","level":"action"}, + "ifActionStatusNE":{"value":"ifActionStatusNE","label":{"en":"If defined Action not executed","fr":"Si l'action n'a pas été executée'"}, + "field4":{"label":{"en": "Action", "fr": "Action"}},"type":"combo","level":"action"}, + "ifControlStatusOK":{"value":"ifControlStatusOK","label":{"en":"If control returned OK","fr":"Si le contrôle est OK'"}, + "field4":{"label":{"en": "Control", "fr": "Control"}},"type":"combo","level":"control"}, + "ifControlStatusNE":{"value":"ifControlStatusNE","label":{"en":"If Control not executed","fr":"Si le contrôle n'a pas été executé'"}, + "field4":{"label":{"en": "Control", "fr": "Control"}},"type":"combo","level":"control"}, "never":{"value":"never","label":{"en":"Never","fr":"Jamais"}}, }