minor refactor

This commit is contained in:
Carlos Jimenez Ruiz 2019-02-13 08:53:57 +01:00
parent fefd6f45af
commit 3bd137a435
1 changed files with 4 additions and 4 deletions

View File

@ -266,11 +266,11 @@ let actions = {
});
},
waitForTextInElement: function(selector, name, done) {
waitForTextInElement: function(selector, text, done) {
this.wait(selector)
.wait((selector, name) => {
return document.querySelector(selector).innerText.toLowerCase().includes(name.toLowerCase());
}, selector, name)
.wait((selector, text) => {
return document.querySelector(selector).innerText.toLowerCase().includes(text.toLowerCase());
}, selector, text)
.then(done)
.catch(done);
},