From 612b2b22f91f3a5c70824f079d7887728e2b38b1 Mon Sep 17 00:00:00 2001 From: Lei PAN Date: Wed, 26 Jul 2023 14:26:58 +0200 Subject: [PATCH] optimization --- src/appointment.js | 5 +++-- src/workers/CommandorPage.js | 7 +++++++ 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/src/appointment.js b/src/appointment.js index 1f2b846..fbb2392 100644 --- a/src/appointment.js +++ b/src/appointment.js @@ -11,8 +11,9 @@ const NINETY_DAYS_IN_S = 3600 * 24 * 30 * 3; let excelUtil = new ExcelUtil(); let collectionName = formatDate(new Date()) // device_to_excludes = ["47e7e36b", "e30eb015"] -// device_to_excludes = ["J4AXB761H2322WJ"] -device_to_excludes = ["4e8ca027", "hi7ljr5xduyt9pfi", "47e7e36b", "e30eb015"] +// device_to_excludes = ["4e8ca027", "hi7ljr5xduyt9pfi", "47e7e36b", "e30eb015"] +device_to_excludes = ["4e8ca027", "hi7ljr5xduyt9pfi", "e30eb015"] +// device_to_excludes = ["4e8ca027", "hi7ljr5xduyt9pfi", "e30eb015", "47e7e36b"] attributedPorts = [] const device_port_info = new Map(); startPort = 9000 diff --git a/src/workers/CommandorPage.js b/src/workers/CommandorPage.js index 98aa248..ce77c05 100644 --- a/src/workers/CommandorPage.js +++ b/src/workers/CommandorPage.js @@ -329,6 +329,13 @@ class CommandorPage { field.value = "" } }) + await delay(200); + await page.evaluate(() => { + let field = document.getElementById("phone_number"); + if (field) { + field.value = "" + } + }) await delay(1000); await page.keyboard.type("0" + this.contact.phoneNumber); this.isPhoneInput = true;