Asserts text in the page with an xpath expression.
string $xpath: The XPath expression.
string $text: The text to compare.
protected function assertTextByXpath($xpath, $text) {
$this
->assertEquals($text, (string) $this
->xpath($xpath)[0]
->getText());
}