You are here

public function WebDriverWebAssert::waitForText in Lightning Media 8.4

Same name and namespace in other branches
  1. 8.3 tests/src/FunctionalJavascript/WebDriverWebAssert.php \Drupal\Tests\lightning_media\FunctionalJavascript\WebDriverWebAssert::waitForText()

Waits for the specified text and returns its element when available.

Parameters

string $text: The text to wait for.

int $timeout: (Optional) Timeout in milliseconds, defaults to 10000.

Return value

\Behat\Mink\Element\NodeElement|null The page element node if found and visible, NULL if not.

Overrides JSWebAssert::waitForText

File

tests/src/FunctionalJavascript/WebDriverWebAssert.php, line 52

Class

WebDriverWebAssert
Contains asynchronous assertions.

Namespace

Drupal\Tests\lightning_media\FunctionalJavascript

Code

public function waitForText($text, $timeout = 10000) {
  $result = parent::waitForText($text, $timeout);
  Assert::assertNotEmpty($result);
}