This commit is contained in:
spiduler
2020-10-20 08:18:46 +09:00
parent 7de1f460f0
commit e036759b15

View File

@@ -43,6 +43,11 @@ class SeleniumBrowser {
.then(() => driver.findElement(By.css('body'))) .then(() => driver.findElement(By.css('body')))
.then(body => body.getAttribute('innerHTML')) .then(body => body.getAttribute('innerHTML'))
.then(html => this.getHtml(html)) .then(html => this.getHtml(html))
.catch(error => {
return driver.findElement(By.css('body'))
.then(body => body.getAttribute('innerHTML'))
.then(html => this.getHtml(html))
})
.finally(() => { .finally(() => {
driver.quit() driver.quit()
}) })