set to random store and try catch

This commit is contained in:
2022-09-16 23:29:12 +02:00
parent 47fecec58f
commit 726e4244dc
+17 -11
View File
@@ -192,17 +192,17 @@ class CommandorPage {
}
async chooseStore(page) {
try {
if (!page.isClosed()) {
await page.locator(PREFER_STORE).focus()
await delay(1000)
await page.click(PREFER_STORE);
await page.selectOption(PREFER_STORE, "faubourg");
}
} catch (e) {
console.log(e);
this.isTerminated = true;
}
// try {
// if (!page.isClosed()) {
// await page.locator(PREFER_STORE).focus()
// await delay(1000)
// await page.click(PREFER_STORE);
// await page.selectOption(PREFER_STORE, "faubourg");
// }
// } catch (e) {
// console.log(e);
// this.isTerminated = true;
// }
// await page.click(PREFER_STORE);
}
@@ -272,6 +272,9 @@ class CommandorPage {
}
async onPageLoad(currentPage) {
try {
let content = await currentPage.content();
let captcha_url = "geo.captcha-delivery.com/captcha";
@@ -294,6 +297,9 @@ class CommandorPage {
}
}
}
} catch (e) {
console.log(e)
}
}
async checkAudioBtn() {