public boolean textPresent(String expectedText) {
        try {
            String bodyText = driver.findElement(By.tagName("body")).getText();
            return bodyText.contains(expectedText);
        } catch (Exception e) {
            log.info(e);
            return false;
        }
    }
public boolean textPresent ( String expectedText ) { try { String bodyText = driver . findElement ( By . tagName ( "body" ) ) . getText ( ) ; return bodyText . contains ( expectedText ) ; } catch ( Exception e ) { log . info ( e ) ; return false ; } }
Determines if the provided text(s) are on the current page.

@param expectedText - the text we are expecting to be present on the page
@return Boolean: whether or not the text is present