add the missed await
This commit is contained in:
@@ -89,13 +89,28 @@ class CommandorPage {
|
|||||||
})
|
})
|
||||||
try {
|
try {
|
||||||
await this.page.goto("https://www.google.com/search?q=hemes+rdv", {timeout: 90 * 1000});
|
await this.page.goto("https://www.google.com/search?q=hemes+rdv", {timeout: 90 * 1000});
|
||||||
this.page.locator(':nth-match(:text("Online Appointment"), 1)').click()
|
|
||||||
// this.page.locator('h3:has-text("Online Appointment")').click()
|
// this.page.locator('h3:has-text("Online Appointment")').click()
|
||||||
// await this.page.goto(RDV_URL, {timeout: 90 * 1000});
|
// await this.page.goto(RDV_URL, {timeout: 90 * 1000});
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
log(e)
|
log(e)
|
||||||
this.isTerminated = true
|
this.isTerminated = true
|
||||||
}
|
}
|
||||||
|
try {
|
||||||
|
this.page.locator('button:has-text("Tout accepter")').click()
|
||||||
|
} catch (e) {
|
||||||
|
log(e)
|
||||||
|
}
|
||||||
|
try {
|
||||||
|
this.page.locator('button:has-text("Accept all")').click()
|
||||||
|
} catch (e) {
|
||||||
|
log(e)
|
||||||
|
}
|
||||||
|
try {
|
||||||
|
this.page.locator(':nth-match(:text("Online Appointment"), 1)').click()
|
||||||
|
} catch (e) {
|
||||||
|
log(e)
|
||||||
|
this.isTerminated = true
|
||||||
|
}
|
||||||
|
|
||||||
let cancel
|
let cancel
|
||||||
const intervalTask = setInterval(() => {
|
const intervalTask = setInterval(() => {
|
||||||
@@ -239,6 +254,7 @@ class CommandorPage {
|
|||||||
await this.checkCGU(page)
|
await this.checkCGU(page)
|
||||||
await this.resolveCaptcha(page)
|
await this.resolveCaptcha(page)
|
||||||
await delay(10 * 1000)
|
await delay(10 * 1000)
|
||||||
|
this.isFillingFields = false
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -342,7 +358,7 @@ class CommandorPage {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async checkAudioBtn() {
|
async checkAudioBtn() {
|
||||||
let isBlocked = this.isBlocked()
|
let isBlocked = await this.isBlocked()
|
||||||
if (!isBlocked) {
|
if (!isBlocked) {
|
||||||
let audioBtn = await this.page.frameLocator("iframe").locator("#captcha__audio__button");
|
let audioBtn = await this.page.frameLocator("iframe").locator("#captcha__audio__button");
|
||||||
log("audioBtn found")
|
log("audioBtn found")
|
||||||
|
|||||||
Reference in New Issue
Block a user