This commit is contained in:
spiduler
2020-10-25 04:14:25 +09:00
parent 9380d2ad7a
commit f88f4c02fe

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)), 10000))))
.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 => {