Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. ElementInterface.php

function ElementInterface::waitFor

Waits for a value to be available and returns it.

A falsy value returned by the callback is considered not found and will retry after some waiting time, until a value is found or the timeout is reached. When the timeout is reached, the falsy value of the last attempt is returned.

@template T

@phpstan-return T

Parameters

int|float $timeout Maximal allowed waiting time in seconds.:

callable(static): T $callback Callback, which result is both used as waiting condition and returned.: Will receive reference to `this element` as first argument.

Return value

mixed

1 method overrides ElementInterface::waitFor()
Element::waitFor in vendor/behat/mink/src/Element/Element.php
Waits for a value to be available and returns it.

File

vendor/behat/mink/src/Element/ElementInterface.php, line 75

Class

ElementInterface
Element interface.

Namespace

Behat\Mink\Element

Code

public function waitFor($timeout, callable $callback);

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal