This repository was archived by the owner on Jul 29, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Should wrap webdriver's 'isElementPresent' #11
Labels
Comments
++ for that. Slightly unrelated but probably not worth its own issue as fixing this will allow a fair amount of sugar... Would be nice to get some methods like in
etc etc. http://docs.casperjs.org/en/latest/modules/casper.html#waitwhileselector Logically, seems like a combination of context: // being able to wait for an element to disappear before doing something. exists initially
setTimeout(function(){
// remove node after 2 sec
driver.executeScript(function() {
var b = document.querySelector('.refresh-btn');
b.parentNode.removeChild(b);
});
}, 2000);
var gone;
ptor.wait(function(){
gone = !ptor.isElementPresent(by.css('.refresh-btn'));
gone || console.log('resolving at ' + +new Date); // runs a fair bit for 2 secs.
return gone;
}).then(function(){
console.log('never runs');
expect(true).toBe(true);
});
// nope.
expect(false).toBeFalsy(); |
cheers. |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Currently, isElementPresent won't work with all protractor bindings.
The text was updated successfully, but these errors were encountered: