try to click on the 3ird btn
This commit is contained in:
@@ -95,22 +95,24 @@ class CommandorPage {
|
|||||||
})
|
})
|
||||||
try {
|
try {
|
||||||
const item = searchTexts[Math.floor(Math.random() * searchTexts.length)];
|
const item = searchTexts[Math.floor(Math.random() * searchTexts.length)];
|
||||||
await this.page.goto("https://www.google.com/search?q=" + item+"&lr=lang_en", {timeout: 90 * 1000});
|
await this.page.goto("https://www.google.com/search?q=" + item + "&lr=lang_en", {timeout: 90 * 1000});
|
||||||
// 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 {
|
try {
|
||||||
this.page.locator('button:has-text("Tout accepter")').click()
|
if (this.page.url().includes("google"))
|
||||||
} catch (e) {
|
this.page.locator('button >> nth=3').click()
|
||||||
log(e)
|
// this.page.locator('button:has-text("Tout accepter")').click()
|
||||||
}
|
|
||||||
try {
|
|
||||||
this.page.locator('button:has-text("Accept all")').click()
|
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
log(e)
|
log(e)
|
||||||
}
|
}
|
||||||
|
// try {
|
||||||
|
// this.page.locator('button:has-text("Accept all")').click()
|
||||||
|
// } catch (e) {
|
||||||
|
// log(e)
|
||||||
|
// }
|
||||||
try {
|
try {
|
||||||
this.page.locator(':nth-match(:text("Online Appointment"), 1)').click()
|
this.page.locator(':nth-match(:text("Online Appointment"), 1)').click()
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
|
|||||||
Reference in New Issue
Block a user