code: protected void expectText(PageElement pageElement, String textOrKey) throws FailureException, TechnicalException {
          WebElement element = null;
          String value = getTextOrKey(textOrKey);
          try {
              element = Context.waitUntil(ExpectedConditions.presenceOfElementLocated(Utilities.getLocator(pageElement)));
          } catch (final Exception e) {
              new Result.Failure<>(e.getMessage(), Messages.getMessage(Messages.FAIL_MESSAGE_UNABLE_TO_FIND_ELEMENT), true, pageElement.getPage().getCallBack());
          }
          try {
              Context.waitUntil(ExpectSteps.textToBeEqualsToExpectedValue(Utilities.getLocator(pageElement), value));
          } catch (final Exception e) {
              logger.error("error in expectText. element is [{}]", element == null ? null : element.getText());
              new Result.Failure<>(element == null ? null : element.getText(), Messages.format(Messages.getMessage(Messages.FAIL_MESSAGE_WRONG_EXPECTED_VALUE), pageElement,
                      textOrKey.startsWith(cryptoService.getPrefix()) ? SECURE_MASK : value, pageElement.getPage().getApplication()), true, pageElement.getPage().getCallBack());
          }
  
      }
docs: Expects that an element contains expected value.
  
  @param pageElement
  Is target element
  @param textOrKey
  Is the expected data (text or text in context (after a save))
  @throws FailureException
  if the scenario encounters a functional error
  @throws TechnicalException