add support for random store

This commit is contained in:
2022-09-15 21:20:07 +02:00
parent 0616d4af65
commit 2a8d6afc88
6 changed files with 34 additions and 9 deletions
+6 -4
View File
@@ -196,10 +196,12 @@ 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, this.selectedStore);
if (selectedStore !== "random") {
await page.locator(PREFER_STORE).focus()
await delay(1000)
await page.click(PREFER_STORE);
await page.selectOption(PREFER_STORE, this.selectedStore);
}
}
} catch (e) {
console.log(e);