format
This commit is contained in:
@@ -75,12 +75,10 @@ class CommandorPage {
|
|||||||
})
|
})
|
||||||
try {
|
try {
|
||||||
await this.page.goto(RDV_URL, {timeout: 90 * 1000});
|
await this.page.goto(RDV_URL, {timeout: 90 * 1000});
|
||||||
}catch (e) {
|
} catch (e) {
|
||||||
console.log(e)
|
console.log(e)
|
||||||
this.isTerminated = true
|
this.isTerminated = true
|
||||||
}
|
}
|
||||||
//wait 10 mins
|
|
||||||
// Close the device.
|
|
||||||
|
|
||||||
let cancel
|
let cancel
|
||||||
const intervalTask = setInterval(() => {
|
const intervalTask = setInterval(() => {
|
||||||
@@ -196,12 +194,12 @@ class CommandorPage {
|
|||||||
this.captchaSolver = new SolveCaptcha(page);
|
this.captchaSolver = new SolveCaptcha(page);
|
||||||
await this.captchaSolver.start((solution) => {
|
await this.captchaSolver.start((solution) => {
|
||||||
console.log("solution is: " + solution);
|
console.log("solution is: " + solution);
|
||||||
if (solution !== ERROR_CAPTCHA_UNSOLVABLE){
|
if (solution !== ERROR_CAPTCHA_UNSOLVABLE) {
|
||||||
page.evaluate((solution) => {
|
page.evaluate((solution) => {
|
||||||
document.getElementById("g-recaptcha-response").innerHTML = solution;
|
document.getElementById("g-recaptcha-response").innerHTML = solution;
|
||||||
}, solution)
|
}, solution)
|
||||||
this.clickValid();}
|
this.clickValid();
|
||||||
else{
|
} else {
|
||||||
this.isTerminated = true;
|
this.isTerminated = true;
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
@@ -231,7 +229,7 @@ class CommandorPage {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
async checkAudioBtn() {
|
async checkAudioBtn() {
|
||||||
// let iframe = await this.page.locator("iframe").contentFrame;
|
// let iframe = await this.page.locator("iframe").contentFrame;
|
||||||
// let audioBtn = iframe.locator("#captcha__audio__button");
|
// let audioBtn = iframe.locator("#captcha__audio__button");
|
||||||
// if (audioBtn) {
|
// if (audioBtn) {
|
||||||
|
|||||||
Reference in New Issue
Block a user