This commit is contained in:
spiduler
2020-10-25 04:04:43 +09:00
parent 7b0317b695
commit 9380d2ad7a

View File

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