I use Assert class to check if some text is on the page, this command stop test executing if text is not present. I want use verification. Could someone tell where I could find documentation on such methods?
I mean WebDriver, junit. For example such code
String text=("Terms");
List<WebElement> list = driver.findElements(By.xpath("//*[contains(text(),'" + text + "')]"));
Assert.assertEquals("Text not found!", "Terms", list);
If there isn't text "Term" on page junit test will interrupt test, but I need just take error message and continue test.