You are here

public function ErrorHandlingTest::testClickOnUnsupportedElement in Zircon Profile 8.0

Same name and namespace in other branches
  1. 8 vendor/behat/mink-browserkit-driver/tests/Custom/ErrorHandlingTest.php \Behat\Mink\Tests\Driver\Custom\ErrorHandlingTest::testClickOnUnsupportedElement()

@expectedException \Behat\Mink\Exception\DriverException @expectedExceptionMessage Behat\Mink\Driver\BrowserKitDriver supports clicking on links and submit or reset buttons only. But "div" provided

File

vendor/behat/mink-browserkit-driver/tests/Custom/ErrorHandlingTest.php, line 132

Class

ErrorHandlingTest

Namespace

Behat\Mink\Tests\Driver\Custom

Code

public function testClickOnUnsupportedElement() {
  $html = <<<'HTML'
<html>
<body>
    <div></div>
</body>
</html>
HTML;
  $this->client
    ->setNextResponse(new Response($html));
  $driver = $this
    ->getDriver();
  $driver
    ->visit('/index.php');
  $driver
    ->click('//div');
}