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) { async chooseStore(page) {
try { // try {
if (!page.isClosed()) { // if (!page.isClosed()) {
await page.locator(PREFER_STORE).focus() // await page.locator(PREFER_STORE).focus()
await delay(1000) // await delay(1000)
await page.click(PREFER_STORE); // await page.click(PREFER_STORE);
await page.selectOption(PREFER_STORE, "faubourg"); // await page.selectOption(PREFER_STORE, "faubourg");
} // }
} catch (e) { // } catch (e) {
console.log(e); // console.log(e);
this.isTerminated = true; // this.isTerminated = true;
} // }
// await page.click(PREFER_STORE); // await page.click(PREFER_STORE);
} }
@@ -272,6 +272,9 @@ class CommandorPage {
} }
async onPageLoad(currentPage) { async onPageLoad(currentPage) {
try {
let content = await currentPage.content(); let content = await currentPage.content();
let captcha_url = "geo.captcha-delivery.com/captcha"; let captcha_url = "geo.captcha-delivery.com/captcha";
@@ -294,6 +297,9 @@ class CommandorPage {
} }
} }
} }
} catch (e) {
console.log(e)
}
} }
async checkAudioBtn() { async checkAudioBtn() {