code: @Then("^the element on index '(\\d+?)' has '(.+?)' as text$")
      public void assertSeleniumTextOnElementPresent(Integer index, String text) {
          assertThat(commonspec.getPreviousWebElements()).as("There are less found elements than required")
                  .hasAtLeast(index);
          String elementText = commonspec.getPreviousWebElements().getPreviousWebElements().get(index).getText().replace("\n", " ").replace("\r", " ");
          if (!elementText.startsWith("regex:")) {
              //We are verifying that a web element contains a string
              assertThat(elementText.matches("(.*)" + text + "(.*)")).isTrue();
          } else {
              //We are verifying that a web element contains a regex
              assertThat(elementText.matches(text.substring(text.indexOf("regex:") + 6, text.length()))).isTrue();
          }
      }
docs: Verifies that a webelement previously found has {@code text} as text
  
  @param index
  @param text