How to use verifyElementDifferent method of org.cerberus.engine.gwt.impl.ControlService class

Best Cerberus-source code snippet using org.cerberus.engine.gwt.impl.ControlService.verifyElementDifferent

Source:ControlService.java Github

copy

Full Screen

...265 case TestCaseStepActionControl.CONTROL_VERIFYELEMENTEQUALS:266 res = this.verifyElementEquals(execution, value1, controlExecution.getValue2());267 break;268 case TestCaseStepActionControl.CONTROL_VERIFYELEMENTDIFFERENT:269 res = this.verifyElementDifferent(execution, value1, controlExecution.getValue2());270 break;271 case TestCaseStepActionControl.CONTROL_VERIFYELEMENTINELEMENT:272 res = this.verifyElementInElement(execution, value1, controlExecution.getValue2());273 break;274 case TestCaseStepActionControl.CONTROL_VERIFYELEMENTCLICKABLE:275 res = this.verifyElementClickable(execution, value1);276 break;277 case TestCaseStepActionControl.CONTROL_VERIFYELEMENTNOTCLICKABLE:278 res = this.verifyElementNotClickable(execution, value1);279 break;280 case TestCaseStepActionControl.CONTROL_VERIFYELEMENTTEXTEQUAL:281 res = this.verifyElementXXX(TestCaseStepActionControl.CONTROL_VERIFYELEMENTTEXTEQUAL, execution, value1, controlExecution.getValue2(), controlExecution.getValue3());282 break;283 case TestCaseStepActionControl.CONTROL_VERIFYELEMENTTEXTDIFFERENT:284 res = this.verifyElementXXX(TestCaseStepActionControl.CONTROL_VERIFYELEMENTTEXTDIFFERENT, execution, value1, controlExecution.getValue2(), controlExecution.getValue3());285 break;286 case TestCaseStepActionControl.CONTROL_VERIFYELEMENTTEXTCONTAINS:287 res = this.verifyElementXXX(TestCaseStepActionControl.CONTROL_VERIFYELEMENTTEXTCONTAINS, execution, value1, controlExecution.getValue2(), controlExecution.getValue3());288 break;289 case TestCaseStepActionControl.CONTROL_VERIFYELEMENTNUMERICEQUAL:290 res = this.verifyElementXXX(TestCaseStepActionControl.CONTROL_VERIFYELEMENTNUMERICEQUAL, execution, value1, controlExecution.getValue2(), controlExecution.getValue3());291 break;292 case TestCaseStepActionControl.CONTROL_VERIFYELEMENTNUMERICDIFFERENT:293 res = this.verifyElementXXX(TestCaseStepActionControl.CONTROL_VERIFYELEMENTNUMERICDIFFERENT, execution, value1, controlExecution.getValue2(), controlExecution.getValue3());294 break;295 case TestCaseStepActionControl.CONTROL_VERIFYELEMENTNUMERICGREATER:296 res = this.verifyElementXXX(TestCaseStepActionControl.CONTROL_VERIFYELEMENTNUMERICGREATER, execution, value1, controlExecution.getValue2(), controlExecution.getValue3());297 break;298 case TestCaseStepActionControl.CONTROL_VERIFYELEMENTNUMERICGREATEROREQUAL:299 res = this.verifyElementXXX(TestCaseStepActionControl.CONTROL_VERIFYELEMENTNUMERICGREATEROREQUAL, execution, value1, controlExecution.getValue2(), controlExecution.getValue3());300 break;301 case TestCaseStepActionControl.CONTROL_VERIFYELEMENTNUMERICMINOR:302 res = this.verifyElementXXX(TestCaseStepActionControl.CONTROL_VERIFYELEMENTNUMERICMINOR, execution, value1, controlExecution.getValue2(), controlExecution.getValue3());303 break;304 case TestCaseStepActionControl.CONTROL_VERIFYELEMENTNUMERICMINOROREQUAL:305 res = this.verifyElementXXX(TestCaseStepActionControl.CONTROL_VERIFYELEMENTNUMERICMINOROREQUAL, execution, value1, controlExecution.getValue2(), controlExecution.getValue3());306 break;307 case TestCaseStepActionControl.CONTROL_VERIFYELEMENTTEXTMATCHREGEX:308 res = this.verifyElementTextMatchRegex(execution, value1, controlExecution.getValue2());309 break;310 case TestCaseStepActionControl.CONTROL_VERIFYTEXTINPAGE:311 res = this.verifyTextInPage(execution, value1);312 break;313 case TestCaseStepActionControl.CONTROL_VERIFYTEXTNOTINPAGE:314 res = this.verifyTextNotInPage(execution, value1);315 break;316 case TestCaseStepActionControl.CONTROL_VERIFYTITLE:317 res = this.verifyTitle(execution, value1, controlExecution.getValue3());318 break;319 case TestCaseStepActionControl.CONTROL_VERIFYURL:320 res = this.verifyUrl(execution, value1);321 break;322 case TestCaseStepActionControl.CONTROL_VERIFYTEXTINDIALOG:323 res = this.verifyTextInDialog(execution, value1, controlExecution.getValue2());324 break;325 case TestCaseStepActionControl.CONTROL_VERIFYXMLTREESTRUCTURE:326 res = this.verifyXmlTreeStructure(execution, value1, controlExecution.getValue2());327 break;328 case TestCaseStepActionControl.CONTROL_TAKESCREENSHOT:329 res = this.takeScreenshot(execution, controlExecution.getTestCaseStepActionExecution(), controlExecution, value1);330 break;331 case TestCaseStepActionControl.CONTROL_GETPAGESOURCE:332 res = this.getPageSource(execution, controlExecution.getTestCaseStepActionExecution(), controlExecution);333 break;334 default:335 res = new MessageEvent(MessageEventEnum.CONTROL_FAILED_UNKNOWNCONTROL);336 res.resolveDescription("CONTROL", controlExecution.getControl());337 }338 } catch (final CerberusEventException exception) {339 res = exception.getMessageError();340 } catch (final Exception unexpected) {341 LOG.debug("Unexpected exception on control!", unexpected);342 res = new MessageEvent(MessageEventEnum.CONTROL_FAILED_GENERIC).resolveDescription("ERROR", unexpected.getMessage());343 }344 // Reset Timeout to default345 robotServerService.setOptionsToDefault(execution.getSession());346 controlExecution.setControlResultMessage(res);347 /*348 * Updating Control result message only if control is not successful.349 * This is to keep the last KO information and preventing KO to be350 * transformed to OK.351 */352 if (!(res.equals(new MessageEvent(MessageEventEnum.CONTROL_SUCCESS)))) {353 controlExecution.setExecutionResultMessage(new MessageGeneral(res.getMessage()));354 }355 /*356 * We only stop the test if Control Event message is in stop status AND357 * the control is FATAL. If control is not fatal, we continue the test358 * but refresh the Execution status.359 */360 if (res.isStopTest() && controlExecution.getFatal().equals("Y")) {361 controlExecution.setStopExecution(true);362 }363 controlExecution.setEnd(new Date().getTime());364 return controlExecution;365 }366 private MessageEvent verifyStringDifferent(String value1, String value2, String isCaseSensitive) {367 MessageEvent mes;368 if (ParameterParserUtil.parseBooleanParam(isCaseSensitive, false) ? !value1.equals(value2) : !value1.equalsIgnoreCase(value2)) {369 mes = new MessageEvent(MessageEventEnum.CONTROL_SUCCESS_STRINGDIFFERENT);370 } else {371 mes = new MessageEvent(MessageEventEnum.CONTROL_FAILED_STRINGDIFFERENT);372 }373 mes.resolveDescription("STRING1", value1);374 mes.resolveDescription("STRING2", value2);375 mes.resolveDescription("STRING3", caseSensitiveMessageValue(isCaseSensitive));376 return mes;377 }378 private MessageEvent verifyStringEqual(String value1, String value2, String isCaseSensitive) {379 MessageEvent mes;380 if (ParameterParserUtil.parseBooleanParam(isCaseSensitive, false) ? value1.equals(value2) : value1.equalsIgnoreCase(value2)) {381 mes = new MessageEvent(MessageEventEnum.CONTROL_SUCCESS_STRINGEQUAL);382 } else {383 mes = new MessageEvent(MessageEventEnum.CONTROL_FAILED_STRINGEQUAL);384 }385 mes.resolveDescription("STRING1", value1);386 mes.resolveDescription("STRING2", value2);387 mes.resolveDescription("STRING3", caseSensitiveMessageValue(isCaseSensitive));388 return mes;389 }390 private MessageEvent verifyStringContains(String value1, String value2, String isCaseSensitive) {391 MessageEvent mes;392 if (ParameterParserUtil.parseBooleanParam(isCaseSensitive, false) ? value1.contains(value2) : value1.toLowerCase().contains(value2.toLowerCase())) {393 mes = new MessageEvent(MessageEventEnum.CONTROL_SUCCESS_CONTAINS);394 } else {395 mes = new MessageEvent(MessageEventEnum.CONTROL_FAILED_CONTAINS);396 }397 mes.resolveDescription("STRING1", value1);398 mes.resolveDescription("STRING2", value2);399 mes.resolveDescription("STRING3", caseSensitiveMessageValue(isCaseSensitive));400 return mes;401 }402 private MessageEvent verifyStringNotContains(String value1, String value2, String isCaseSensitive) {403 MessageEvent mes;404 if (ParameterParserUtil.parseBooleanParam(isCaseSensitive, false) ? value1.contains(value2) : value1.toLowerCase().contains(value2.toLowerCase())) {405 mes = new MessageEvent(MessageEventEnum.CONTROL_FAILED_NOTCONTAINS);406 } else {407 mes = new MessageEvent(MessageEventEnum.CONTROL_SUCCESS_NOTCONTAINS);408 }409 mes.resolveDescription("STRING1", value1);410 mes.resolveDescription("STRING2", value2);411 mes.resolveDescription("STRING3", caseSensitiveMessageValue(isCaseSensitive));412 return mes;413 }414 private MessageEvent verifyStringGreater(String value1, String value2) {415 MessageEvent mes;416 if (value1.compareToIgnoreCase(value2) > 0) {417 mes = new MessageEvent(MessageEventEnum.CONTROL_SUCCESS_GREATER);418 } else {419 mes = new MessageEvent(MessageEventEnum.CONTROL_FAILED_GREATER);420 }421 mes.resolveDescription("STRING1", value1);422 mes.resolveDescription("STRING2", value2);423 return mes;424 }425 private MessageEvent verifyStringMinor(String value1, String value2) {426 MessageEvent mes;427 if (value1.compareToIgnoreCase(value2) < 0) {428 mes = new MessageEvent(MessageEventEnum.CONTROL_SUCCESS_MINOR);429 } else {430 mes = new MessageEvent(MessageEventEnum.CONTROL_FAILED_MINOR);431 }432 mes.resolveDescription("STRING1", value1);433 mes.resolveDescription("STRING2", value2);434 return mes;435 }436 private MessageEvent evaluateControlIfNumericXXX(String control, String controlValue1, String controlValue2) {437 if (LOG.isDebugEnabled()) {438 LOG.debug("Checking if Numeric Equals");439 }440 MessageEvent mes = new MessageEvent(MessageEventEnum.CONTROL_PENDING);441 // We first prepare the string for numeric conversion to replace , by .442 String newControlValue1 = StringUtil.prepareToNumeric(controlValue1);443 String newControlValue2 = StringUtil.prepareToNumeric(controlValue2);444 // We try to convert the strings value1 to numeric.445 Double value1;446 try {447 value1 = Double.valueOf(newControlValue1);448 } catch (NumberFormatException nfe) {449 mes = new MessageEvent(MessageEventEnum.CONTROL_FAILED_VALUES_NOTNUMERIC);450 mes.resolveDescription("COND", control);451 mes.resolveDescription("STRINGVALUE", newControlValue1);452 return mes;453 }454 // We try to convert the strings value2 to numeric.455 Double value2;456 try {457 value2 = Double.valueOf(newControlValue2);458 } catch (NumberFormatException nfe) {459 mes = new MessageEvent(MessageEventEnum.CONTROL_FAILED_VALUES_NOTNUMERIC);460 mes.resolveDescription("COND", control);461 mes.resolveDescription("STRINGVALUE", newControlValue2);462 return mes;463 }464 // Now that both values are converted to double we check the operator here.465 switch (control) {466 case TestCaseStepActionControl.CONTROL_VERIFYNUMERICEQUALS:467 if (Objects.equals(value1, value2)) {468 mes = new MessageEvent(MessageEventEnum.CONTROL_SUCCESS_EQUAL);469 } else {470 mes = new MessageEvent(MessageEventEnum.CONTROL_FAILED_EQUAL);471 }472 break;473 case TestCaseStepActionControl.CONTROL_VERIFYNUMERICDIFFERENT:474 if (!(Objects.equals(value1, value2))) {475 mes = new MessageEvent(MessageEventEnum.CONTROL_SUCCESS_DIFFERENT);476 } else {477 mes = new MessageEvent(MessageEventEnum.CONTROL_FAILED_DIFFERENT);478 }479 break;480 case TestCaseStepActionControl.CONTROL_VERIFYNUMERICGREATER:481 if (value1 > value2) {482 mes = new MessageEvent(MessageEventEnum.CONTROL_SUCCESS_GREATER);483 } else {484 mes = new MessageEvent(MessageEventEnum.CONTROL_FAILED_GREATER);485 }486 break;487 case TestCaseStepActionControl.CONTROL_VERIFYNUMERICGREATEROREQUAL:488 if (value1 >= value2) {489 mes = new MessageEvent(MessageEventEnum.CONTROL_SUCCESS_GREATEROREQUAL);490 } else {491 mes = new MessageEvent(MessageEventEnum.CONTROL_FAILED_GREATEROREQUAL);492 }493 break;494 case TestCaseStepActionControl.CONTROL_VERIFYNUMERICMINOR:495 if (value1 < value2) {496 mes = new MessageEvent(MessageEventEnum.CONTROL_SUCCESS_MINOR);497 } else {498 mes = new MessageEvent(MessageEventEnum.CONTROL_FAILED_MINOR);499 }500 break;501 case TestCaseStepActionControl.CONTROL_VERIFYNUMERICMINOROREQUAL:502 if (value1 <= value2) {503 mes = new MessageEvent(MessageEventEnum.CONTROL_SUCCESS_MINOROREQUAL);504 } else {505 mes = new MessageEvent(MessageEventEnum.CONTROL_FAILED_MINOROREQUAL);506 }507 break;508 default:509 mes = new MessageEvent(MessageEventEnum.CONTROL_FAILED);510 }511 mes.resolveDescription("COND", control);512 mes.resolveDescription("STRING1", value1.toString());513 mes.resolveDescription("STRING2", value2.toString());514 return mes;515 }516 private MessageEvent verifyElementPresent(TestCaseExecution tCExecution, String elementPath) {517 LOG.debug("Control: verifyElementPresent on: {}", elementPath);518 MessageEvent mes;519 if (!StringUtil.isNull(elementPath)) {520 Identifier identifier = identifierService.convertStringToIdentifier(elementPath);521 if (tCExecution.getAppTypeEngine().equalsIgnoreCase(Application.TYPE_GUI)522 || tCExecution.getAppTypeEngine().equalsIgnoreCase(Application.TYPE_APK)523 || tCExecution.getAppTypeEngine().equalsIgnoreCase(Application.TYPE_IPA)) {524 try {525 if (identifier.getIdentifier().equals(Identifier.IDENTIFIER_PICTURE)) {526 return sikuliService.doSikuliVerifyElementPresent(tCExecution.getSession(), identifier.getLocator(), "");527 } else if (identifier.getIdentifier().equals(Identifier.IDENTIFIER_TEXT)) {528 return sikuliService.doSikuliVerifyElementPresent(tCExecution.getSession(), "", identifier.getLocator());529 } else if (this.webdriverService.isElementPresent(tCExecution.getSession(), identifier)) {530 mes = new MessageEvent(MessageEventEnum.CONTROL_SUCCESS_PRESENT);531 mes.resolveDescription("STRING1", elementPath);532 return mes;533 } else {534 mes = new MessageEvent(MessageEventEnum.CONTROL_FAILED_PRESENT);535 mes.resolveDescription("STRING1", elementPath);536 return mes;537 }538 } catch (WebDriverException exception) {539 return parseWebDriverException(exception);540 }541 } else if (tCExecution.getAppTypeEngine().equalsIgnoreCase(Application.TYPE_SRV)) {542 if (tCExecution.getLastServiceCalled() != null) {543 String responseBody = tCExecution.getLastServiceCalled().getResponseHTTPBody();544 switch (tCExecution.getLastServiceCalled().getResponseHTTPBodyContentType()) {545 case AppService.RESPONSEHTTPBODYCONTENTTYPE_XML:546 if (xmlUnitService.isElementPresent(responseBody, elementPath)) {547 mes = new MessageEvent(MessageEventEnum.CONTROL_SUCCESS_PRESENT);548 } else {549 mes = new MessageEvent(MessageEventEnum.CONTROL_FAILED_PRESENT);550 }551 mes.resolveDescription("STRING1", elementPath);552 return mes;553 case AppService.RESPONSEHTTPBODYCONTENTTYPE_JSON: {554 try {555 //Return of getFromJson can be "[]" in case when the path has this pattern "$..ex" and no elements found. Two dots after $ return a list.556 if (!jsonService.getFromJson(responseBody, null, elementPath).equals("[]")) {557 mes = new MessageEvent(MessageEventEnum.CONTROL_SUCCESS_PRESENT);558 mes.resolveDescription("STRING1", elementPath);559 return mes;560 } else {561 throw new PathNotFoundException();562 }563 } catch (PathNotFoundException ex) {564 mes = new MessageEvent(MessageEventEnum.CONTROL_FAILED_PRESENT);565 mes.resolveDescription("STRING1", elementPath);566 return mes;567 } catch (Exception ex) {568 mes = new MessageEvent(MessageEventEnum.CONTROL_FAILED_GENERIC);569 mes.resolveDescription("ERROR", ex.toString());570 return mes;571 }572 }573 default:574 mes = new MessageEvent(MessageEventEnum.CONTROL_NOTEXECUTED_NOTSUPPORTED_FOR_MESSAGETYPE);575 mes.resolveDescription("TYPE", tCExecution.getLastServiceCalled().getResponseHTTPBodyContentType());576 mes.resolveDescription("CONTROL", TestCaseStepActionControl.CONTROL_VERIFYELEMENTPRESENT);577 return mes;578 }579 } else {580 mes = new MessageEvent(MessageEventEnum.CONTROL_FAILED_NOOBJECTINMEMORY);581 return mes;582 }583 } else if (tCExecution.getAppTypeEngine().equalsIgnoreCase(Application.TYPE_FAT)) {584 if (identifier.getIdentifier().equals(Identifier.IDENTIFIER_PICTURE)) {585 return sikuliService.doSikuliVerifyElementPresent(tCExecution.getSession(), identifier.getLocator(), "");586 } else if (identifier.getIdentifier().equals(Identifier.IDENTIFIER_TEXT)) {587 return sikuliService.doSikuliVerifyElementPresent(tCExecution.getSession(), "", identifier.getLocator());588 } else {589 mes = new MessageEvent(MessageEventEnum.CONTROL_NOTEXECUTED_NOTSUPPORTED_FOR_APPLICATION_AND_IDENTIFIER);590 mes.resolveDescription("IDENTIFIER", identifier.getIdentifier());591 mes.resolveDescription("CONTROL", TestCaseStepActionControl.CONTROL_VERIFYELEMENTPRESENT);592 mes.resolveDescription("APPLICATIONTYPE", tCExecution.getAppTypeEngine());593 return mes;594 }595 } else {596 mes = new MessageEvent(MessageEventEnum.CONTROL_NOTEXECUTED_NOTSUPPORTED_FOR_APPLICATION);597 mes.resolveDescription("CONTROL", TestCaseStepActionControl.CONTROL_VERIFYELEMENTPRESENT);598 mes.resolveDescription("APPLICATIONTYPE", tCExecution.getAppTypeEngine());599 return mes;600 }601 } else {602 return new MessageEvent(MessageEventEnum.CONTROL_FAILED_PRESENT_NULL);603 }604 }605 private MessageEvent verifyElementNotPresent(TestCaseExecution execution, String elementPath) {606 LOG.debug("Control: verifyElementNotPresent on: {}", elementPath);607 MessageEvent mes;608 if (!StringUtil.isNull(elementPath)) {609 Identifier identifier = identifierService.convertStringToIdentifier(elementPath);610 if (execution.getAppTypeEngine().equalsIgnoreCase(Application.TYPE_GUI)611 || execution.getAppTypeEngine().equalsIgnoreCase(Application.TYPE_APK)612 || execution.getAppTypeEngine().equalsIgnoreCase(Application.TYPE_IPA)) {613 try {614 if (identifier.getIdentifier().equals(Identifier.IDENTIFIER_PICTURE)) {615 return sikuliService.doSikuliVerifyElementNotPresent(execution.getSession(), identifier.getLocator(), "");616 } else if (identifier.getIdentifier().equals(Identifier.IDENTIFIER_TEXT)) {617 return sikuliService.doSikuliVerifyElementNotPresent(execution.getSession(), "", identifier.getLocator());618 } else if (!this.webdriverService.isElementPresent(execution.getSession(), identifier)) {619 mes = new MessageEvent(MessageEventEnum.CONTROL_SUCCESS_NOTPRESENT);620 } else {621 mes = new MessageEvent(MessageEventEnum.CONTROL_FAILED_NOTPRESENT);622 }623 mes.resolveDescription("STRING1", elementPath);624 return mes;625 } catch (WebDriverException exception) {626 return parseWebDriverException(exception);627 }628 } else if (execution.getAppTypeEngine().equalsIgnoreCase(Application.TYPE_FAT)) {629 if (identifier.getIdentifier().equals(Identifier.IDENTIFIER_PICTURE)) {630 return sikuliService.doSikuliVerifyElementNotPresent(execution.getSession(), identifier.getLocator(), "");631 } else if (identifier.getIdentifier().equals(Identifier.IDENTIFIER_TEXT)) {632 return sikuliService.doSikuliVerifyElementNotPresent(execution.getSession(), "", identifier.getLocator());633 } else {634 mes = new MessageEvent(MessageEventEnum.CONTROL_NOTEXECUTED_NOTSUPPORTED_FOR_APPLICATION_AND_IDENTIFIER);635 mes.resolveDescription("IDENTIFIER", identifier.getIdentifier());636 mes.resolveDescription("CONTROL", TestCaseStepActionControl.CONTROL_VERIFYELEMENTNOTPRESENT);637 mes.resolveDescription("APPLICATIONTYPE", execution.getAppTypeEngine());638 return mes;639 }640 } else if (execution.getAppTypeEngine().equalsIgnoreCase(Application.TYPE_SRV)) {641 if (execution.getLastServiceCalled() != null) {642 String responseBody = execution.getLastServiceCalled().getResponseHTTPBody();643 switch (execution.getLastServiceCalled().getResponseHTTPBodyContentType()) {644 case AppService.RESPONSEHTTPBODYCONTENTTYPE_XML:645 if (!(xmlUnitService.isElementPresent(responseBody, elementPath))) {646 mes = new MessageEvent(MessageEventEnum.CONTROL_SUCCESS_NOTPRESENT);647 } else {648 mes = new MessageEvent(MessageEventEnum.CONTROL_FAILED_NOTPRESENT);649 }650 mes.resolveDescription("STRING1", elementPath);651 return mes;652 case AppService.RESPONSEHTTPBODYCONTENTTYPE_JSON: {653 try {654 //Return of getFromJson can be "[]" in case when the path has this pattern "$..ex" and no elements found. Two dots after $ return a list.655 if (!jsonService.getFromJson(responseBody, null, elementPath).equals("[]")) {656 mes = new MessageEvent(MessageEventEnum.CONTROL_FAILED_NOTPRESENT);657 mes.resolveDescription("STRING1", elementPath);658 return mes;659 } else {660 throw new PathNotFoundException();661 }662 } catch (PathNotFoundException ex) {663 mes = new MessageEvent(MessageEventEnum.CONTROL_SUCCESS_NOTPRESENT);664 mes.resolveDescription("STRING1", elementPath);665 return mes;666 } catch (Exception ex) {667 mes = new MessageEvent(MessageEventEnum.CONTROL_FAILED_GENERIC);668 mes.resolveDescription("ERROR", ex.toString());669 return mes;670 }671 }672 default:673 mes = new MessageEvent(MessageEventEnum.CONTROL_NOTEXECUTED_NOTSUPPORTED_FOR_MESSAGETYPE);674 mes.resolveDescription("TYPE", execution.getLastServiceCalled().getResponseHTTPBodyContentType());675 mes.resolveDescription("CONTROL", TestCaseStepActionControl.CONTROL_VERIFYELEMENTNOTPRESENT);676 return mes;677 }678 } else {679 mes = new MessageEvent(MessageEventEnum.CONTROL_FAILED_NOOBJECTINMEMORY);680 return mes;681 }682 } else {683 mes = new MessageEvent(MessageEventEnum.CONTROL_NOTEXECUTED_NOTSUPPORTED_FOR_APPLICATION);684 mes.resolveDescription("CONTROL", TestCaseStepActionControl.CONTROL_VERIFYELEMENTNOTPRESENT);685 mes.resolveDescription("APPLICATIONTYPE", execution.getAppTypeEngine());686 return mes;687 }688 } else {689 return new MessageEvent(MessageEventEnum.CONTROL_FAILED_NOTPRESENT_NULL);690 }691 }692 private MessageEvent verifyElementInElement(TestCaseExecution tCExecution, String element, String childElement) {693 LOG.debug("Control: verifyElementInElement on: '{}' is child of '{}'", element, childElement);694 MessageEvent mes;695 if (tCExecution.getAppTypeEngine().equalsIgnoreCase(Application.TYPE_GUI)696 || tCExecution.getAppTypeEngine().equalsIgnoreCase(Application.TYPE_APK)) {697 if (!StringUtil.isNull(element) && !StringUtil.isNull(childElement)) {698 try {699 Identifier identifier = identifierService.convertStringToIdentifier(element);700 Identifier childIdentifier = identifierService.convertStringToIdentifier(childElement);701 if (this.webdriverService.isElementPresent(tCExecution.getSession(), identifier)) {702 if (this.webdriverService.isElementInElement(tCExecution.getSession(), identifier, childIdentifier)) {703 mes = new MessageEvent(MessageEventEnum.CONTROL_SUCCESS_ELEMENTINELEMENT);704 } else {705 mes = new MessageEvent(MessageEventEnum.CONTROL_FAILED_ELEMENTINELEMENT);706 }707 mes.resolveDescription("STRING2", element);708 mes.resolveDescription("STRING1", childElement);709 } else {710 mes = new MessageEvent(MessageEventEnum.CONTROL_FAILED_NO_SUCH_ELEMENT);711 mes.resolveDescription("SELEX", new NoSuchElementException("").toString());712 mes.resolveDescription("ELEMENT", element);713 }714 } catch (WebDriverException exception) {715 return parseWebDriverException(exception);716 }717 } else {718 mes = new MessageEvent(MessageEventEnum.CONTROL_FAILED_ELEMENTINELEMENT);719 mes.resolveDescription("STRING2", element);720 mes.resolveDescription("STRING1", childElement);721 }722 } else {723 mes = new MessageEvent(MessageEventEnum.CONTROL_NOTEXECUTED_NOTSUPPORTED_FOR_APPLICATION);724 mes.resolveDescription("CONTROL", TestCaseStepActionControl.CONTROL_VERIFYELEMENTINELEMENT);725 mes.resolveDescription("APPLICATIONTYPE", tCExecution.getAppTypeEngine());726 }727 return mes;728 }729 private MessageEvent verifyElementVisible(TestCaseExecution tCExecution, String html) {730 LOG.debug("Control: verifyElementVisible on: {}", html);731 MessageEvent mes;732 if (!StringUtil.isNull(html)) {733 if (tCExecution.getAppTypeEngine().equalsIgnoreCase(Application.TYPE_GUI)734 || tCExecution.getAppTypeEngine().equalsIgnoreCase(Application.TYPE_APK)735 || tCExecution.getAppTypeEngine().equalsIgnoreCase(Application.TYPE_IPA)) {736 try {737 Identifier identifier = identifierService.convertStringToIdentifier(html);738 if (this.webdriverService.isElementVisible(tCExecution.getSession(), identifier)) {739 mes = new MessageEvent(MessageEventEnum.CONTROL_SUCCESS_VISIBLE);740 } else {741 mes = new MessageEvent(MessageEventEnum.CONTROL_FAILED_VISIBLE);742 }743 mes.resolveDescription("STRING1", html);744 } catch (WebDriverException exception) {745 return parseWebDriverException(exception);746 }747 } else {748 mes = new MessageEvent(MessageEventEnum.CONTROL_NOTEXECUTED_NOTSUPPORTED_FOR_APPLICATION);749 mes.resolveDescription("CONTROL", TestCaseStepActionControl.CONTROL_VERIFYELEMENTVISIBLE);750 mes.resolveDescription("APPLICATIONTYPE", tCExecution.getAppTypeEngine());751 }752 } else {753 mes = new MessageEvent(MessageEventEnum.CONTROL_FAILED_VISIBLE_NULL);754 }755 return mes;756 }757 private MessageEvent verifyElementNotVisible(TestCaseExecution tCExecution, String html) {758 LOG.debug("Control: verifyElementNotVisible on: {}", html);759 MessageEvent mes;760 if (!StringUtil.isNull(html)) {761 if (tCExecution.getAppTypeEngine().equalsIgnoreCase(Application.TYPE_GUI)762 || tCExecution.getAppTypeEngine().equalsIgnoreCase(Application.TYPE_APK)763 || tCExecution.getAppTypeEngine().equalsIgnoreCase(Application.TYPE_IPA)) {764 try {765 Identifier identifier = identifierService.convertStringToIdentifier(html);766 if (this.webdriverService.isElementPresent(tCExecution.getSession(), identifier)) {767 if (this.webdriverService.isElementNotVisible(tCExecution.getSession(), identifier)) {768 mes = new MessageEvent(MessageEventEnum.CONTROL_SUCCESS_NOTVISIBLE);769 } else {770 mes = new MessageEvent(MessageEventEnum.CONTROL_FAILED_NOTVISIBLE);771 }772 mes.resolveDescription("STRING1", html);773 } else {774 mes = new MessageEvent(MessageEventEnum.CONTROL_FAILED_PRESENT);775 }776 mes.resolveDescription("STRING1", html);777 } catch (WebDriverException exception) {778 return parseWebDriverException(exception);779 }780 } else {781 mes = new MessageEvent(MessageEventEnum.CONTROL_NOTEXECUTED_NOTSUPPORTED_FOR_APPLICATION);782 mes.resolveDescription("CONTROL", TestCaseStepActionControl.CONTROL_VERIFYELEMENTNOTVISIBLE);783 mes.resolveDescription("APPLICATIONTYPE", tCExecution.getAppTypeEngine());784 }785 } else {786 mes = new MessageEvent(MessageEventEnum.CONTROL_FAILED_NOTVISIBLE_NULL);787 }788 return mes;789 }790 private MessageEvent verifyElementEquals(TestCaseExecution tCExecution, String xpath, String expectedElement) {791 LOG.debug("Control: verifyElementEquals on: {} expected Element: {}", xpath, expectedElement);792 MessageEvent mes;793 // If case of not compatible application then exit with error794 if (!tCExecution.getAppTypeEngine().equalsIgnoreCase(Application.TYPE_SRV)) {795 mes = new MessageEvent(MessageEventEnum.CONTROL_NOTEXECUTED_NOTSUPPORTED_FOR_APPLICATION);796 mes.resolveDescription("CONTROL", TestCaseStepActionControl.CONTROL_VERIFYELEMENTEQUALS);797 mes.resolveDescription("APPLICATIONTYPE", tCExecution.getAppTypeEngine());798 } else if (tCExecution.getLastServiceCalled() != null) {799 // Check if element on the given xpath is equal to the given expected element800 String xmlResponse = tCExecution.getLastServiceCalled().getResponseHTTPBody();801 if (AppService.RESPONSEHTTPBODYCONTENTTYPE_XML.equals(tCExecution.getLastServiceCalled().getResponseHTTPBodyContentType())) {802 mes = xmlUnitService.isElementEquals(xmlResponse, xpath, expectedElement) ? new MessageEvent(MessageEventEnum.CONTROL_SUCCESS_ELEMENTEQUALS) : new MessageEvent(MessageEventEnum.CONTROL_FAILED_ELEMENTEQUALS);803 mes.resolveDescription("XPATH", xpath);804 mes.resolveDescription("EXPECTED_ELEMENT", expectedElement);805 } else {806 mes = new MessageEvent(MessageEventEnum.CONTROL_NOTEXECUTED_NOTSUPPORTED_FOR_MESSAGETYPE);807 mes.resolveDescription("TYPE", tCExecution.getLastServiceCalled().getResponseHTTPBodyContentType());808 mes.resolveDescription("CONTROL", TestCaseStepActionControl.CONTROL_VERIFYELEMENTEQUALS);809 }810 } else {811 mes = new MessageEvent(MessageEventEnum.CONTROL_FAILED_NOOBJECTINMEMORY);812 }813 return mes;814 }815 private MessageEvent verifyElementDifferent(TestCaseExecution tCExecution, String xpath, String differentElement) {816 LOG.debug("Control: verifyElementDifferent on: {} expected Element: {}", xpath, differentElement);817 MessageEvent mes = null;818 // If case of not compatible application then exit with error819 if (!tCExecution.getAppTypeEngine().equalsIgnoreCase(Application.TYPE_SRV)) {820 mes = new MessageEvent(MessageEventEnum.CONTROL_NOTEXECUTED_NOTSUPPORTED_FOR_APPLICATION);821 mes.resolveDescription("CONTROL", TestCaseStepActionControl.CONTROL_VERIFYELEMENTDIFFERENT);822 mes.resolveDescription("APPLICATIONTYPE", tCExecution.getAppTypeEngine());823 } else if (tCExecution.getLastServiceCalled() != null) {824 //Check if element on the given xpath is different from the given different element825 if (AppService.RESPONSEHTTPBODYCONTENTTYPE_XML.equals(tCExecution.getLastServiceCalled().getResponseHTTPBodyContentType())) {826 String xmlResponse = tCExecution.getLastServiceCalled().getResponseHTTPBody();827 mes = xmlUnitService.isElementEquals(xmlResponse, xpath, differentElement) ? new MessageEvent(MessageEventEnum.CONTROL_FAILED_ELEMENTDIFFERENT) : new MessageEvent(MessageEventEnum.CONTROL_SUCCESS_ELEMENTDIFFERENT);828 mes.resolveDescription("XPATH", xpath);829 mes.resolveDescription("DIFFERENT_ELEMENT", differentElement);830 } else {...

Full Screen

Full Screen

Source:ControlServiceTest.java Github

copy

Full Screen

...948// String xpath = "/foo/bar";949// String expectedElement = "<bar>baz</bar>";950//951// TestCaseStepActionControlExecution tcsace = new TestCaseStepActionControlExecution();952// tcsace.setControlType("verifyElementDifferent");953// tcsace.setControlProperty(xpath);954// tcsace.setControlValue(expectedElement);955// tcsace.setFatal("Y");956// TestCaseStepExecution tcse = new TestCaseStepExecution();957// tcse.settCExecution(tCExecution);958// TestCaseStepActionExecution tcsae = new TestCaseStepActionExecution();959// tcsae.setTestCaseStepExecution(tcse);960// tcsace.setTestCaseStepActionExecution(tcsae);961//962// this.controlService.doControl(tcsace);963//964// Assert.assertEquals(MessageEventEnum.CONTROL_NOTEXECUTED_NOTSUPPORTED_FOR_APPLICATION.getCode(), tcsace.getControlResultMessage().getCode());965// }966// 967// @Test968// public void testVerifyElementDifferentWithElementDifferent() {969// String xpath = "/foo/bar";970// String expectedElement = "<bar>baz</bar>";971// String msg = "Element in path '" + xpath + "' is different from '" + expectedElement + "'.";972// 973// TestCaseStepActionControlExecution tcsace = new TestCaseStepActionControlExecution();974// tcsace.setControlType("verifyElementDifferent");975// tcsace.setControlProperty(xpath);976// tcsace.setControlValue(expectedElement);977// tcsace.setFatal("Y");978// TestCaseStepExecution tcse = new TestCaseStepExecution();979// tcse.settCExecution(tCExecution);980// TestCaseStepActionExecution tcsae = new TestCaseStepActionExecution();981// tcsae.setTestCaseStepExecution(tcse);982// tcsace.setTestCaseStepActionExecution(tcsae);983// 984// when(application.getType()).thenReturn("WS");985// when(xmlUnitService.isElementEquals(tCExecution, xpath, expectedElement)).thenReturn(Boolean.FALSE);986//987// this.controlService.doControl(tcsace);988//989// Assert.assertEquals(MessageEventEnum.CONTROL_SUCCESS_ELEMENTDIFFERENT.getCode(), tcsace.getControlResultMessage().getCode());990// Assert.assertEquals(msg, tcsace.getControlResultMessage().getDescription());991// }992// 993// @Test994// public void testVerifyElementDifferentWithElementEquals() {995// String xpath = "/foo/bar";996// String expectedElement = "<bar>baz</bar>";997// String msg = "Element in path '" + xpath + "' is not different from '" + expectedElement + "'.";998// 999// TestCaseStepActionControlExecution tcsace = new TestCaseStepActionControlExecution();1000// tcsace.setControlType("verifyElementDifferent");1001// tcsace.setControlProperty(xpath);1002// tcsace.setControlValue(expectedElement);1003// tcsace.setFatal("Y");1004// TestCaseStepExecution tcse = new TestCaseStepExecution();1005// tcse.settCExecution(tCExecution);1006// TestCaseStepActionExecution tcsae = new TestCaseStepActionExecution();1007// tcsae.setTestCaseStepExecution(tcse);1008// tcsace.setTestCaseStepActionExecution(tcsae);1009// 1010// when(application.getType()).thenReturn("WS");1011// when(xmlUnitService.isElementEquals(tCExecution, xpath, expectedElement)).thenReturn(Boolean.TRUE);1012//1013// this.controlService.doControl(tcsace);1014//...

Full Screen

Full Screen

verifyElementDifferent

Using AI Code Generation

copy

Full Screen

1package com.test;2import org.cerberus.engine.gwt.impl.ControlService;3import org.cerberus.engine.gwt.impl.PageService;4import org.cerberus.engine.gwt.impl.TestCaseService;5import org.cerberus.engine.gwt.impl.TestService;6import org.cerberus.engine.gwt.impl.TestSuiteService;7import org.cerberus.engine.gwt.impl.VariableService;8import org.cerberus.exception.CerberusException;9import org.cerberus.util.StringUtil;10import org.cerberus.util.answer.Answer;11import org.cerberus.util.answer.AnswerItem;12import org.cerberus.util.answer.AnswerList;13import org.openqa.selenium.WebDriver;14import org.openqa.selenium.WebElement;15import org.openqa.selenium.chrome.ChromeDriver;16import org.openqa.selenium.chrome.ChromeOptions;17import org.openqa.selenium.remote.DesiredCapabilities;18import org.openqa.selenium.support.ui.WebDriverWait;19public class Cerberus {20public static void main(String[] args) throws CerberusException {21 String property = System.getProperty("user.dir");22 System.setProperty("webdriver.chrome.driver", property+ "\\chromedriver.exe");23 ChromeOptions options = new ChromeOptions();24 options.addArguments("disable-infobars");25 DesiredCapabilities capabilities = DesiredCapabilities.chrome();26 capabilities.setCapability(ChromeOptions.CAPABILITY, options);27 WebDriver driver = new ChromeDriver(capabilities);28 WebDriverWait wait = new WebDriverWait(driver, 10);29 driver.manage().window().maximize();30 String application = "Google";31 String page = "Google";32 String testCase = "Google";33 String test = "Google";34 String testSuite = "Google";35 String country = "US";36 String environment = "QA";37 String browser = "Google";38 String version = "Google";39 String platform = "Google";40 String screenSize = "Google";41 String robot = "Google";42 String robotIP = "Google";43 String robotPort = "Google";44 String tag = "Google";45 String screenshot = "Google";46 String verbose = "Google";47 String timeout = "Google";48 String retries = "Google";49 String manualURL = "Google";50 String manualExecution = "Google";51 String seleniumIP = "Google";

Full Screen

Full Screen

verifyElementDifferent

Using AI Code Generation

copy

Full Screen

1import org.cerberus.engine.entity.SeleniumAction;2import org.cerberus.engine.entity.SeleniumActionControl;3import org.cerberus.engine.entity.SeleniumActionControlExecution;4import org.cerberus.engine.entity.SeleniumActionExecution;5import org.cerberus.engine.entity.TestCaseExecution;6import org.cerberus.engine.entity.TestCaseStepActionExecution;7import org.cerberus.engine.entity.TestCaseStepExecution;8import org.cerberus.engine.gwt.IControlService;9import org.cerberus.engine.gwt.impl.ControlService;10import org.cerberus.engine.execution.impl.TestCaseStepActionExecutionService;11import org.cerberus.engine.execution.impl.TestCaseStepExecutionService;12import org.cerberus.engine.execution.impl.TestCaseExecutionService;13import org.cerberus.engine.execution.impl.TestService;14import org.cerberus.engine.execution.impl.TestCaseStepActionExecutionService;15import org.cerberus.engine.execution.impl.TestCaseStepExecutionService;16import org.cerberus.engine.execution.impl.TestCaseExecutionService;17import org.cerberus.engine.execution.impl.TestService;18import org.cerberus.engine.execution.impl.TestCaseStepActionExecutionService;19import org.cerberus.engine.execution.impl.TestCaseStepExecutionService;20import org.cerberus.engine.execution.impl.TestCaseExecutionService;21import org.cerberus.engine.execution.impl.TestService;22import org.cerberus.engine.execution.impl.TestCaseStepActionExecutionService;23import org.cerberus.engine.execution.impl.TestCaseStepExecutionService;24import org.cerberus.engine.execution.impl.TestCaseExecutionService;25import org.cerberus.engine.execution.impl.TestService;26import org.cerberus.engine.execution.impl.TestCaseStepActionExecutionService;27import org.cerberus.engine.execution.impl.TestCaseStepExecutionService;28import org.cerberus.engine.execution.impl.TestCaseExecutionService;29import org.cerberus.engine.execution.impl.TestService;30import org.cerberus.engine.execution.impl.TestCaseStepActionExecutionService;31import org.cerberus.engine.execution.impl.TestCaseStepExecutionService;32import org.cerberus.engine.execution.impl.TestCaseExecutionService;33import org.cerberus.engine.execution.impl.TestService;34import org.cerberus.engine.execution.impl.TestCaseStepActionExecutionService;35import org.cerberus.engine.execution.impl.TestCaseStepExecutionService;36import org.cerberus.engine.execution.impl.TestCaseExecutionService;37import org.cerberus.engine.execution.impl.TestService;38import org.c

Full Screen

Full Screen

verifyElementDifferent

Using AI Code Generation

copy

Full Screen

1package org.cerberus.campaign;2import org.cerberus.engine.entity.Selenium;3import org.cerberus.engine.entity.TestCaseExecution;4import org.cerberus.engine.entity.TestDataLibData;5import org.cerberus.engine.entity.TestDataLibResult;6import org.cerberus.engine.execution.IControlService;7import org.cerberus.engine.execution.impl.ControlService;8import org.cerberus.engine.execution.impl.TestCaseExecutionService;9import org.cerberus.engine.gwt.IPropertyService;10import org.cerberus.engine.gwt.impl.PropertyService;11import org.cerberus.engine.gwt.impl.SeleniumService;12import org.cerberus.engine.verification.IVerifyService;13import org.cerberus.engine.verification.impl.VerifyService;14import org.cerberus.exception.CerberusException;15import org.cerberus.util.answer.AnswerItem;16import org.cerberus.util.answer.AnswerList;17import org.openqa.selenium.WebDriver;18import org.openqa.selenium.WebElement;19import org.openqa.selenium.remote.RemoteWebDriver;20import java.util.List;21public class VerifyElementDifferent {22 public static void main(String[] args) throws CerberusException {23 Selenium selenium = new Selenium();24 selenium.setHost("localhost");25 selenium.setPort("4444");26 selenium.setBrowser("firefox");27 selenium.setPlatform("WINDOWS");28 selenium.setVersion("");29 selenium.setScreenSize("1024x768");30 selenium.setCapabilities("");31 selenium.setTimeout("30000");32 selenium.setPageLoadTimeout("30000");33 selenium.setImplicitWait("30000");34 selenium.setSpeed("1000");35 selenium.setOptions("");36 selenium.setArguments("");37 selenium.setProxyHost("");38 selenium.setProxyPort("");39 selenium.setProxyUser("");40 selenium.setProxyPassword("");41 selenium.setRemoteURL("");42 selenium.setSeleniumIP("");43 selenium.setSeleniumPort("");44 selenium.setRobot("");45 selenium.setRobotPort("");46 selenium.setRobotHost("");47 selenium.setRobotPlatform("");48 selenium.setRobotBrowser("");49 selenium.setRobotVersion("");50 selenium.setRobotScreenSize("");51 selenium.setRobotOptions("");52 selenium.setRobotArguments("");53 selenium.setRobotProxyHost("");54 selenium.setRobotProxyPort("");55 selenium.setRobotProxyUser("");56 selenium.setRobotProxyPassword("");57 selenium.setRobotTimeout("");

Full Screen

Full Screen

verifyElementDifferent

Using AI Code Generation

copy

Full Screen

1package org.cerberus.engine.gwt;2import org.cerberus.engine.gwt.impl.ControlService;3import org.cerberus.engine.gwt.impl.ElementService;4import org.cerberus.engine.gwt.impl.TestCaseService;5import org.cerberus.engine.gwt.impl.TestService;6import org.cerberus.exception.CerberusException;7import org.cerberus.util.StringUtil;8import org.openqa.selenium.WebDriver;9import org.openqa.selenium.WebElement;10import org.openqa.selenium.support.ui.Select;11import org.openqa.selenium.support.ui.WebDriverWait;12import org.springframework.beans.factory.annotation.Autowired;13import org.springframework.stereotype.Service;14public class CerberusService {15 private TestCaseService testCaseService;16 private TestService testService;17 private ElementService elementService;18 private ControlService controlService;19 private WebDriver driver;20 private WebDriverWait wait;21 public void executeTestCase(String test, String testCase) throws CerberusException {22 TestCase testCaseToExecute = testCaseService.findTestCaseByKey(test, testCase);23 Test testToExecute = testService.findTestByKey(test);24 List<ElementToControl> listOfElementsToControl = elementService.findElementListToControlByTestTestCase(test, testCase);25 testCaseService.executeTestCase(testCaseToExecute, testToExecute, listOfElementsToControl, driver, wait);26 }27 public void executeTestCase(String test, String testCase, String country, String environment, String browser, String browserVersion, String screenSize) throws CerberusException {28 TestCase testCaseToExecute = testCaseService.findTestCaseByKey(test, testCase);29 Test testToExecute = testService.findTestByKey(test);30 List<ElementToControl> listOfElementsToControl = elementService.findElementListToControlByTestTestCase(test, testCase);31 testCaseService.executeTestCase(testCaseToExecute, testTo

Full Screen

Full Screen

verifyElementDifferent

Using AI Code Generation

copy

Full Screen

1import org.cerberus.engine.gwt.impl.ControlService;2import org.cerberus.engine.gwt.impl.VerificationService;3import org.cerberus.testing.gwt.impl.GwtTestCase;4public class 3 extends GwtTestCase {5 public String getModuleName() {6 return "org.cerberus.testing.gwt.impl.GwtTestCase";7 }8 public void test() {9 assertTrue(ControlService.waitForPageToLoad(30000));10 assertTrue(ControlService.verifyElementDifferent("google", "id", "text", false));11 }12}13import org.cerberus.engine.gwt.impl.ControlService;14import org.cerber

Full Screen

Full Screen

verifyElementDifferent

Using AI Code Generation

copy

Full Screen

1package org.cerberus.testcases;2import org.cerberus.engine.gwt.impl.ControlService;3import org.cerberus.engine.gwt.impl.PageService;4import org.cerberus.engine.gwt.impl.TestCaseService;5import org.cerberus.engine.gwt.impl.TestService;6import org.cerberus.engine.gwt.impl.TestcaseExecutionService;7import org.cerberus.engine.gwt.impl.VerifyService;8import org.cerberus.util.answer.AnswerItem;9import org.openqa.selenium.WebDriver;10public class Test3 extends TestCaseService {11 public Test3(TestService test, WebDriver webdriver) {12 super(test, webdriver);13 }14 public void executeTestCase() {15 testcaseExecutionData = new TestcaseExecutionService(test, webdriver, testcaseExecutionData);

Full Screen

Full Screen

verifyElementDifferent

Using AI Code Generation

copy

Full Screen

1package org.cerberus.jar;2import org.cerberus.engine.entity.MessageEvent;3import org.cerberus.engine.gwt.impl.ControlService;4import org.cerberus.engine.gwt.impl.TestCaseService;5import org.cerberus.engine.gwt.impl.TestService;6import org.cerberus.engine.gwt.impl.VariableService;7import org.cerberus.engine.gwt.shared.IControlService;8import org.cerberus.engine.gwt.shared.ITestCaseService;9import org.cerberus.engine.gwt.shared.ITestService;10import org.cerberus.engine.gwt.shared.IVariableService;11import org.cerberus.exception.CerberusEventException;12public class 3 {13 public static void main(String[] args) throws CerberusEventException {14 ITestService testService = new TestService();15 ITestCaseService testCaseService = new TestCaseService();16 IControlService controlService = new ControlService();17 IVariableService variableService = new VariableService();18 MessageEvent res = controlService.verifyElementDifferent(testService.findTestByKey("TEST"), testCaseService.findTestCaseByKey("TEST", "TC1"), "TEST", "TC1", "obj1", "obj2", "obj3", "obj4", "obj5", "obj6", "obj7", "obj8", "obj9", "obj10", "obj11", "obj12", "obj13", "obj14", "obj15", "obj16", "obj17", "obj18", "obj19", "obj20", "obj21", "obj22", "obj23", "obj24", "obj25", "obj26", "obj27", "obj28", "obj29", "obj30", "obj31", "obj32", "obj33", "obj34", "obj35", "obj36", "obj37", "obj38", "obj39", "obj40", "obj41", "obj42", "obj43", "obj44", "obj45", "obj46", "obj47", "obj48", "obj49", "obj50", "obj51", "obj52", "obj53", "obj

Full Screen

Full Screen

Automation Testing Tutorials

Learn to execute automation testing from scratch with LambdaTest Learning Hub. Right from setting up the prerequisites to run your first automation test, to following best practices and diving deeper into advanced test scenarios. LambdaTest Learning Hubs compile a list of step-by-step guides to help you be proficient with different test automation frameworks i.e. Selenium, Cypress, TestNG etc.

LambdaTest Learning Hubs:

YouTube

You could also refer to video tutorials over LambdaTest YouTube channel to get step by step demonstration from industry experts.

Try LambdaTest Now !!

Get 100 minutes of automation test minutes FREE!!

Next-Gen App & Browser Testing Cloud

Was this article helpful?

Helpful

NotHelpful