You are here

public function BrowserTestHelpersTrait::findButton in Typed Data API enhancements 8

Finds button with specified locator.

Parameters

string $locator: Button id, value or alt.

Return value

\Behat\Mink\Element\NodeElement|null The button node element.

File

tests/src/Traits/BrowserTestHelpersTrait.php, line 45

Class

BrowserTestHelpersTrait
Provides some helpers for BrowserTestBase.

Namespace

Drupal\Tests\typed_data\Traits

Code

public function findButton($locator) {
  return $this
    ->getSession()
    ->getPage()
    ->findButton($locator);
}