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

Breadcrumb

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

function WebAssert::checkboxChecked

Checks that specific checkbox is checked.

Parameters

string $field field id|name|label|value:

TraversableElement|null $container document to check against:

Return value

void

Throws

ExpectationException

File

vendor/behat/mink/src/WebAssert.php, line 822

Class

WebAssert
Mink web assertions tool.

Namespace

Behat\Mink

Code

public function checkboxChecked(string $field, ?TraversableElement $container = null) {
    $node = $this->fieldExists($field, $container);
    $this->assert($node->isChecked(), sprintf('Checkbox "%s" is not checked, but it should be.', $field));
}

API Navigation

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