function WebAssert::fieldNotExists
Checks that specific field does not exist on the current page.
Parameters
string $field field id|name|label|value:
TraversableElement|null $container document to check against:
Return value
void
Throws
File
-
vendor/
behat/ mink/ src/ WebAssert.php, line 747
Class
- WebAssert
- Mink web assertions tool.
Namespace
Behat\MinkCode
public function fieldNotExists(string $field, ?TraversableElement $container = null) {
$container = $container ?: $this->session
->getPage();
$node = $container->findField($field);
$this->assert(null === $node, sprintf('A field "%s" appears on this page, but it should not.', $field));
}