This commit is contained in:
spiduler
2020-10-22 13:39:14 +09:00
parent 6e180779e4
commit 2ae8dd735b

View File

@@ -14,16 +14,16 @@ class SeleniumBrowser {
} }
this.capabilities = Capabilities.chrome() this.capabilities = Capabilities.chrome()
this.sleep = m => new Promise(r => setTimeout(r, m)) this.sleep = m => new Promise(r => setTimeout(r, m))
this.pool = pool.createPool({ // this.pool = pool.createPool({
create: () => { // create: () => {
return this.getDriver(); // return this.getDriver();
}, // },
destroy: function (driver) { // destroy: function (driver) {
driver.quit(); // driver.quit();
} // }
}, { // }, {
max: 10, min: 1 // max: 10, min: 1
}); // });
} }
getDriver() { getDriver() {
@@ -122,9 +122,9 @@ class SeleniumBrowser {
} }
async close() { async close() {
this.pool.drain().then(function () { // this.pool.drain().then(function () {
this.pool.clear(); // this.pool.clear();
}) // })
} }
loggingChrome() { loggingChrome() {