$assert_session->assertNoElementAfterWait('css','[data-drupal-selector="edit-test-assert-no-element-after-wait-fail"]',500,'Element exists on page after too short wait.');
$this->fail('Element not exists on page after too short wait.');
// This test is fragile if webdriver responses are very slow for some
// reason. If they are, do not fail the test.
// @todo https://www.drupal.org/project/drupal/issues/3316317 remove this
// workaround.
if(Timer::read('JSWebAssertTest')<1000){
$this->fail("Element not exists on page after too short wait.");
}
}
catch(ElementHtmlException$e){
$this->assertSame('Element exists on page after too short wait.',$e->getMessage());