How to grab arbitrary text from a page WITHOUT knowing what the text is?

I would like to pull a string of text off a page right after it loads so I can use that in logic to determine a pass/fail. For instance, I want to make a script that will

1). load up a dynamic URL,
2). when page loads, grab the first full sentence of text on the page and store it
3). after attempting to submit a form with intentionally incorrect data, I want to see if that form submission progressed to the next page, or if it reloads the same page (something like if(WebUI.verifyTextPresent(text_from_page_load, false)){ fail } else { pass })