This commit is contained in:
2022-09-09 13:58:06 +02:00
parent e19ba716ad
commit 2754be7761
+4 -6
View File
@@ -75,12 +75,10 @@ class CommandorPage {
})
try {
await this.page.goto(RDV_URL, {timeout: 90 * 1000});
}catch (e) {
} catch (e) {
console.log(e)
this.isTerminated = true
}
//wait 10 mins
// Close the device.
let cancel
const intervalTask = setInterval(() => {
@@ -196,12 +194,12 @@ class CommandorPage {
this.captchaSolver = new SolveCaptcha(page);
await this.captchaSolver.start((solution) => {
console.log("solution is: " + solution);
if (solution !== ERROR_CAPTCHA_UNSOLVABLE){
if (solution !== ERROR_CAPTCHA_UNSOLVABLE) {
page.evaluate((solution) => {
document.getElementById("g-recaptcha-response").innerHTML = solution;
}, solution)
this.clickValid();}
else{
this.clickValid();
} else {
this.isTerminated = true;
}
})