Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. BrowserKitDriver.php

function BrowserKitDriver::getCrawler

Returns crawler instance (got from client).

Return value

Crawler

Throws

DriverException

File

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

Class

BrowserKitDriver
Symfony BrowserKit driver.

Namespace

Behat\Mink\Driver

Code

private function getCrawler() : Crawler {
    try {
        $crawler = $this->client
            ->getCrawler();
    } catch (BadMethodCallException $e) {
        $crawler = null;
    }
    if (null === $crawler) {
        throw new DriverException('Unable to access the response content before visiting a page');
    }
    return $crawler;
}

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal