try to click on the 3ird btn

This commit is contained in:
2023-02-18 13:43:24 +01:00
parent fefc021cbc
commit 645803b09d
+8 -6
View File
@@ -102,15 +102,17 @@ class CommandorPage {
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) {