private function BrowserKitDriver::canSubmitForm in Zircon Profile 8.0
Same name and namespace in other branches
- 8 vendor/behat/mink-browserkit-driver/src/BrowserKitDriver.php \Behat\Mink\Driver\BrowserKitDriver::canSubmitForm()
Determines if a node can submit a form.
Parameters
\DOMElement $node Node.:
Return value
boolean
1 call to BrowserKitDriver::canSubmitForm()
- BrowserKitDriver::click in vendor/
behat/ mink-browserkit-driver/ src/ BrowserKitDriver.php - Clicks button or link located by it's XPath query.
File
- vendor/
behat/ mink-browserkit-driver/ src/ BrowserKitDriver.php, line 715
Class
- BrowserKitDriver
- Symfony2 BrowserKit driver.
Namespace
Behat\Mink\DriverCode
private function canSubmitForm(\DOMElement $node) {
$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);
}