Unable to access WebDriverJS, wait until in Protractor and CoffeeScript
I need to wait for the modal to close, so I wait for the missing element. I am trying to do something like this:
browser.driver.wait until.stalenessOf(By.css '.modal-header')
Unfortunately Coffeescript is reserved until
. So I tried to use:
browser.driver.wait browser.driver.until.stalenessOf(By.css '.modal-header')
but it's undefined ( until
). browser.driver
exists, but it does not contain until
.
How can I access the object before the object? Also, is there any other way to wait until the element is no longer on the page?
source to share
You can use isPresent () instead :
browser.wait ->
not element(By.css '.modal-header').isPresent()
,
5000
NOTE: isPresent()
Will not return false until the implicit wait for this element completes, so if you set the property browser.manage().timeouts().implicitlyWait
very high you can temporarily decrease its value.
source to share