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