You are here

public function WebDriverWebAssert::waitForField 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::waitForField()

Waits for a field with specified locator and returns it when available.

Parameters

string $locator: The input ID, name or label for the field (input, textarea, select).

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

Return value

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

Overrides JSWebAssert::waitForField

File

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

Class

WebDriverWebAssert
Contains asynchronous assertions.

Namespace

Drupal\Tests\lightning_media\FunctionalJavascript

Code

public function waitForField($locator, $timeout = 10000) {
  $field = parent::waitForField($locator, $timeout);
  Assert::assertNotEmpty($field);
  return $field;
}