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

Breadcrumb

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

function WebAssert::elementAttributeNotExists

Checks that an attribute does not exist in an element.

Parameters

string $selectorType:

string|array $selector:

string $attribute:

Return value

NodeElement

Throws

ElementHtmlException

ElementNotFoundException

File

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

Class

WebAssert
Mink web assertions tool.

Namespace

Behat\Mink

Code

public function elementAttributeNotExists(string $selectorType, $selector, string $attribute) {
    $element = $this->elementExists($selectorType, $selector);
    $message = sprintf('The attribute "%s" was found in the %s.', $attribute, $this->getMatchingElementRepresentation($selectorType, $selector));
    $this->assertElement(!$element->hasAttribute($attribute), $message, $element);
    return $element;
}

API Navigation

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