private function getCrawlerNode(Crawler $crawler)
    {
        $node = null;

        if ($crawler instanceof \Iterator) {
            // for symfony 2.3 compatibility as getNode is not public before symfony 2.4
            $crawler->rewind();
            $node = $crawler->current();
        } else {
            $node = $crawler->getNode(0);
        }

        if (null !== $node) {
            return $node;
        }

        throw new DriverException('The element does not exist');
    }
private function getCrawlerNode(Crawler $crawler)
    {
        $node = null;

        if ($crawler instanceof \Iterator) {
            // for symfony 2.3 compatibility as getNode is not public before symfony 2.4
            $crawler->rewind();
            $node = $crawler->current();
        } else {
            $node = $crawler->getNode(0);
        }

        if (null !== $node) {
            return $node;
        }

        throw new DriverException('The element does not exist');
    }
private function getCrawlerNode ( Crawler $ crawler ) { $ node = null ; if ( $ crawler instanceof \ Iterator ) { // for symfony 2.3 compatibility as getNode is not public before symfony 2.4 $ crawler -> rewind ( ) ; $ node = $ crawler -> current ( ) ; } else { $ node = $ crawler -> getNode ( 0 ) ; } if ( null !== $ node ) { return $ node ; } throw new DriverException ( 'The element does not exist' ) ; }
Returns DOMElement from crawler instance.

@param Crawler $crawler

@return \DOMElement

@throws DriverException when the node does not exist
Returns DOMElement from crawler instance .