SyntaxFix
Write A Post
Hire A Developer
Questions
Try this. It's very easy:
driver.getPageSource().contains("text to search");
This really worked for me in Selenium WebDriver.