private function getFilteredCrawler($xpath)
    {
        if (!count($crawler = $this->getCrawler()->filterXPath($xpath))) {
            throw new DriverException(sprintf('There is no element matching XPath "%s"', $xpath));
        }

        return $crawler;
    }
private function getFilteredCrawler($xpath)
    {
        if (!count($crawler = $this->getCrawler()->filterXPath($xpath))) {
            throw new DriverException(sprintf('There is no element matching XPath "%s"', $xpath));
        }

        return $crawler;
    }
private function getFilteredCrawler ( $ xpath ) { if ( ! count ( $ crawler = $ this -> getCrawler ( ) -> filterXPath ( $ xpath ) ) ) { throw new DriverException ( sprintf ( 'There is no element matching XPath "%s"' , $ xpath ) ) ; } return $ crawler ; }
Returns a crawler filtered for the given XPath, requiring at least 1 result.

@param string $xpath

@return Crawler

@throws DriverException when no matching elements are found
Returns a crawler filtered for the given XPath requiring at least 1 result .