add the missed await

This commit is contained in:
2022-12-09 13:43:14 +01:00
parent c669e80ab0
commit a0f725ffeb
+18 -2
View File
@@ -89,13 +89,28 @@ class CommandorPage {
})
try {
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()
// await this.page.goto(RDV_URL, {timeout: 90 * 1000});
} catch (e) {
log(e)
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
const intervalTask = setInterval(() => {
@@ -239,6 +254,7 @@ class CommandorPage {
await this.checkCGU(page)
await this.resolveCaptcha(page)
await delay(10 * 1000)
this.isFillingFields = false
}
}
@@ -342,7 +358,7 @@ class CommandorPage {
}
async checkAudioBtn() {
let isBlocked = this.isBlocked()
let isBlocked = await this.isBlocked()
if (!isBlocked) {
let audioBtn = await this.page.frameLocator("iframe").locator("#captcha__audio__button");
log("audioBtn found")