From d65c1742ff82714e475ee24006d83d9416397cb8 Mon Sep 17 00:00:00 2001 From: Lei PAN Date: Sun, 18 Sep 2022 13:35:58 +0200 Subject: [PATCH] reset to faubourg store --- src/excel/ExcelUtil.js | 2 +- src/workers/CommandorPage.js | 22 +++++++++++----------- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/src/excel/ExcelUtil.js b/src/excel/ExcelUtil.js index 188e07b..2796d5c 100644 --- a/src/excel/ExcelUtil.js +++ b/src/excel/ExcelUtil.js @@ -4,7 +4,7 @@ const ContactPojo = require("../models/ContactPojo"); class ExcelUtil { readContacts() { - let workSheetsFromFile = xlsx.parse('C:/Users/lei/Desktop/contact_all.xlsx'); + let workSheetsFromFile = xlsx.parse('/Users/panlei/Desktop/contact_all.xlsx'); console.log(workSheetsFromFile); // return a list of contactPojo let contactList = []; diff --git a/src/workers/CommandorPage.js b/src/workers/CommandorPage.js index 5129a0f..e2d5c64 100644 --- a/src/workers/CommandorPage.js +++ b/src/workers/CommandorPage.js @@ -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); }