How to verify certain text is displayed on the page/element?

I’m trying to capture screenshots using selenium webdriver on a page that has textarea with a large scrollable text. I need to capture screenshots of all the texts in the textarea. With my code, I am able to scroll down on the textarea and take screenshots but need to stop once all the texts are shown. Here is the code

    while(!textDisplayedInPage("text at the bottom of textarea element")){
        takeScreenShot();
        scrollDown();
       }
    

public boolean textDisplayedInPage(String text){
    WebElement element = null;
    try{
        element =getDriver().findElement(By.xpath("//*[contains(text(),'"+text+"')]"));
    }catch (Exception e){}
    if(element != null){
        return true;
    };
    return false;
}

problem is the textDisplayedInPage() method doesn’t work and selenium finds the element on the first screen even though it’s not displayed yet and breaks the loop. I have tried few answers that I found of similar issues here but all fails to deliver what’s displayed. Any insight on how to capture or verify displayed text of a scrollable element would help.