session->wait($timeout, '(typeof(jQuery)=="undefined" || (0 === jQuery.active && 0 === jQuery(\':animated\').length))'); if (!$result) { throw new \RuntimeException($message); } } /** * Waits for the jQuery autocomplete delay duration. * * @see https://api.jqueryui.com/autocomplete/#option-delay */ public function waitOnAutocomplete() { // Drupal is using the default delay value of 300 milliseconds. $this->session->wait(300); $this->assertWaitOnAjaxRequest(); } }