code: public static Condition textCaseSensitive(final String text) {
      return new Condition("textCaseSensitive") {
        @Override
        public boolean apply(Driver driver, WebElement element) {
          return Html.text.containsCaseSensitive(element.getText(), text);
        }
  
        @Override
        public String toString() {
          return name + " '" + text + '\'';
        }
      };
    }
docs: <p>Sample: <code>$("h1").shouldHave(textCaseSensitive("Hello\s*John"))</code></p>
  
  <p>NB! Ignores multiple whitespaces between words</p>
  
  @param text expected text of HTML element