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

Breadcrumb

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

function WebAssert::assertElementText

Asserts a condition involving the text of an element.

Parameters

bool $condition:

string $message Failure message:

Element $element:

Return value

void

Throws

ElementTextException when the condition is not fulfilled

2 calls to WebAssert::assertElementText()
WebAssert::elementTextContains in vendor/behat/mink/src/WebAssert.php
Checks that specific element contains text.
WebAssert::elementTextNotContains in vendor/behat/mink/src/WebAssert.php
Checks that specific element does not contains text.

File

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

Class

WebAssert
Mink web assertions tool.

Namespace

Behat\Mink

Code

private function assertElementText(bool $condition, string $message, Element $element) : void {
    if ($condition) {
        return;
    }
    throw new ElementTextException($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