You are here

public function NodeElement::hasAttribute in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 vendor/behat/mink/src/Element/NodeElement.php \Behat\Mink\Element\NodeElement::hasAttribute()

Checks whether element has attribute with specified name.

Parameters

string $name:

Return value

Boolean

1 call to NodeElement::hasAttribute()
NodeElement::hasClass in vendor/behat/mink/src/Element/NodeElement.php
Checks whether an element has a named CSS class.

File

vendor/behat/mink/src/Element/NodeElement.php, line 115

Class

NodeElement
Page element node.

Namespace

Behat\Mink\Element

Code

public function hasAttribute($name) {
  return null !== $this
    ->getDriver()
    ->getAttribute($this
    ->getXpath(), $name);
}