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

Breadcrumb

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

function WebAssert::assertElement

Asserts a condition on an element.

Parameters

bool $condition:

string $message Failure message:

Element $element:

Return value

void

Throws

ElementHtmlException when the condition is not fulfilled

6 calls to WebAssert::assertElement()
WebAssert::elementAttributeContains in vendor/behat/mink/src/WebAssert.php
Checks that an attribute of a specific elements contains text.
WebAssert::elementAttributeExists in vendor/behat/mink/src/WebAssert.php
Checks that an attribute exists in an element.
WebAssert::elementAttributeNotContains in vendor/behat/mink/src/WebAssert.php
Checks that an attribute of a specific elements does not contain text.
WebAssert::elementAttributeNotExists in vendor/behat/mink/src/WebAssert.php
Checks that an attribute does not exist in an element.
WebAssert::elementContains in vendor/behat/mink/src/WebAssert.php
Checks that specific element contains HTML.

... See full list

File

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

Class

WebAssert
Mink web assertions tool.

Namespace

Behat\Mink

Code

private function assertElement(bool $condition, string $message, Element $element) : void {
    if ($condition) {
        return;
    }
    throw new ElementHtmlException($message, $this->session
        ->getDriver(), $element);
}

API Navigation

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