-
-
Save CaseyHaralson/9965492d894565bfe9d7 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var currentPage = 0; | |
element.all(by.css('#tableid td')).map(function (page) { | |
var pageHtml = ''; | |
return page.getInnerHtml().then(function (html) { | |
pageHtml = html; | |
return page.getText(); | |
}).then(function (text) { | |
if (currentPage != 0 && parseInt(text) == currentPage + 1) { | |
return page; | |
} | |
if (pageHtml.indexOf('<span>') > -1) { | |
currentPage = parseInt(pageHtml.replace('<span>', '').replace('</span>', '')); | |
} | |
}); | |
}).then(function (page) { | |
//never gets here, there are memory issues above | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment