This commit is contained in:
spiduler
2020-10-25 04:03:49 +09:00
parent 1f88616cf5
commit 7b0317b695

View File

@@ -122,7 +122,7 @@ class SeleniumBrowser {
getHtml(driver, html, params) { getHtml(driver, html, params) {
if (params.waitElements) { if (params.waitElements) {
return driver.get(params.uri) return driver.get(params.uri)
.then(() => Promise.all(params.waitElements.map(s => driver.wait(until.elementLocated(By.css(s)))))) .then(() => Promise.all(params.waitElements.map(s => driver.wait(until.elementLocated(By.css(s)), 1000 * 5))))
.then(() => driver.findElement(By.css('body'))) .then(() => driver.findElement(By.css('body')))
.then(body => body.getAttribute('innerHTML')) .then(body => body.getAttribute('innerHTML'))
.then(html => { .then(html => {