public function JSWebAssert::waitForField in Drupal 8
Same name and namespace in other branches
- 9 core/tests/Drupal/FunctionalJavascriptTests/JSWebAssert.php \Drupal\FunctionalJavascriptTests\JSWebAssert::waitForField()
- 10 core/tests/Drupal/FunctionalJavascriptTests/JSWebAssert.php \Drupal\FunctionalJavascriptTests\JSWebAssert::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.
File
- core/
tests/ Drupal/ FunctionalJavascriptTests/ JSWebAssert.php, line 192
Class
- JSWebAssert
- Defines a class with methods for asserting presence of elements during tests.
Namespace
Drupal\FunctionalJavascriptTestsCode
public function waitForField($locator, $timeout = 10000) {
return $this
->waitForElement('named', [
'field',
$locator,
], $timeout);
}