Skip to content

Instantly share code, notes, and snippets.

@epayet
Created November 26, 2015 16:16
Show Gist options
  • Save epayet/6e09a433653886a3740f to your computer and use it in GitHub Desktop.
Save epayet/6e09a433653886a3740f to your computer and use it in GitHub Desktop.
Strange trick to avoid element not visible errors
browser.wait(function () {
return editAnswersPage.currentBraSize.getText().then(function(text) {
return text == '32C'; // Do a little Promise/Boolean dance here, since wait will resolve promises.
});;
}, 10000, 'menu should dissappear').then(function(value) {
console.log(value);
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment