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

Breadcrumb

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

function BrowserKitDriver::canSubmitForm

1 call to BrowserKitDriver::canSubmitForm()
BrowserKitDriver::click in vendor/behat/mink-browserkit-driver/src/BrowserKitDriver.php
Clicks button or link located by its XPath query.

File

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

Class

BrowserKitDriver
Symfony BrowserKit driver.

Namespace

Behat\Mink\Driver

Code

private function canSubmitForm(\DOMElement $node) : bool {
    $type = $node->hasAttribute('type') ? $node->getAttribute('type') : null;
    if ('input' === $node->nodeName && in_array($type, array(
        'submit',
        'image',
    ), true)) {
        return true;
    }
    return 'button' === $node->nodeName && (null === $type || 'submit' === $type);
}
RSS feed
Powered by Drupal