290 // wait for loading shroud to go away await this.page.waitForSelector('div.loading', { 'visible':false, 'timeout':25000 }); let btnSuccess = false; let breakCount = 0; do { await this.page.waitForSelector('button.btn.btn-success', { 'visible':true, 'timeout':45000 }).then(async (elm) => { await elm.click({ 'delay':Scraper.notARobot() }); }).catch(() => { btnSuccess = true; }); await this._randomWait(this.page, 1, 1, 'preparePSSearch btnSuccess'); breakCount++; } while(!btnSuccess && breakCount < 5);