I am trying to figure out how to make webdriver.io wait until all ajax requests have finished after clicking a button.
Unfortunately the document.readyState is always = 'complete' , and there is nothing "unique" about the webpage except that it has some slightly different data in it.
is there some other way I can test to see if the javascript functions are complete in the page..?
await this.browser.waitUntil(function () {
return this.execute(function () {
if (document.readyState === 'complete')
return true;
})
});