Q:

Equivalent of isTextPresent of Selenium 1 (Selenium RC) in Selenium 2 (WebDriver)

There's no isTextPresent in Selenium 2 (WebDriver)
What is the correct way to assert the existence of some text on a page with WebDriver?

A:

I normally do something along the lines of:
assertEquals(driver.getPageSource().contains("sometext"), true);

assertTrue(driver.getPageSource().contains("sometext"));

A:

Page source contains HTML tags which might break your search text and result in false negatives. I found this solution works much like Selenium RC's isTextPresent API.
WebDriver driver = new FirefoxDriver(); //or some other driver
driver.findElement(By.tagName("body")).getText().contains("Some text to search")

doing getText and then contains does have a performance trade-off. You might want to narrow down search tree by using a more specific WebElement.

A:

I know this is a bit old, but I found a good answer here: Selenium 2.0 Web Driver: implementation of isTextPresent
In Python, this looks like:
def is_text_present(self, text):
    try: el = self.driver.find_element_by_tag_name("body")
    except NoSuchElementException, e: return False
    return text in el.text

