You are here

private function BrowserKitDriver::getCrawlerNode in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 vendor/behat/mink-browserkit-driver/src/BrowserKitDriver.php \Behat\Mink\Driver\BrowserKitDriver::getCrawlerNode()

Returns DOMElement from crawler instance.

Parameters

Crawler $crawler:

Return value

\DOMElement

Throws

DriverException when the node does not exist

6 calls to BrowserKitDriver::getCrawlerNode()
BrowserKitDriver::click in vendor/behat/mink-browserkit-driver/src/BrowserKitDriver.php
Clicks button or link located by it's XPath query.
BrowserKitDriver::getFormField in vendor/behat/mink-browserkit-driver/src/BrowserKitDriver.php
Returns form field from XPath query.
BrowserKitDriver::getOuterHtml in vendor/behat/mink-browserkit-driver/src/BrowserKitDriver.php
Returns element's outer html by it's XPath query.
BrowserKitDriver::getValue in vendor/behat/mink-browserkit-driver/src/BrowserKitDriver.php
Returns element's value by it's XPath query.
BrowserKitDriver::isChecked in vendor/behat/mink-browserkit-driver/src/BrowserKitDriver.php
Checks whether checkbox or radio button located by it's XPath query is checked.

... See full list

File

vendor/behat/mink-browserkit-driver/src/BrowserKitDriver.php, line 808

Class

BrowserKitDriver
Symfony2 BrowserKit driver.

Namespace

Behat\Mink\Driver

Code

private function getCrawlerNode(Crawler $crawler) {
  $crawler
    ->rewind();
  $node = $crawler
    ->current();
  if (null !== $node) {
    return $node;
  }
  throw new DriverException('The element does not exist');
}