I need to wait for a modal to close so I am waiting for the absence of an element. I'm trying to do something like this:
browser.driver.wait until.stalenessOf(By.css '.modal-header')
Unfortunately Coffeescript has reserved until
. So I tried using:
browser.driver.wait browser.driver.until.stalenessOf(By.css '.modal-header')
but it is undefined (until
that is). browser.driver
exists but it doesn't contain until
.
How can I access the until object? Also, is there another way to wait until an element is no longer on the page?