From 8fcc749ca8299791475998bfcd33a0667ede1f3b Mon Sep 17 00:00:00 2001 From: Lei PAN Date: Thu, 10 Aug 2023 10:40:57 +0200 Subject: [PATCH] log with device info --- src/workers/CommandorPage.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/workers/CommandorPage.js b/src/workers/CommandorPage.js index e433b0a..a42c5a1 100644 --- a/src/workers/CommandorPage.js +++ b/src/workers/CommandorPage.js @@ -548,8 +548,8 @@ class CommandorPage { try { // remove debug flag // const validElement = await page.$('.btn'); - console.log("will click on valid button"); - console.log("isTerminated is " + this.isTerminated); + logWithDevice("will click on valid button", this.device); + logWithDevice("isTerminated is " + this.isTerminated, this.device); if (!this.isTerminated) { let raw = await this.getRawAppointmentInfo(this.page) if (raw.email !== undefined) { @@ -598,6 +598,7 @@ class CommandorPage { //check whether there is captcha let pageContent = await page.content() let hasCaptcha = pageContent.includes("g-recaptcha-response") + logWithDevice("hasCaptcha = " + hasCaptcha, this.device) if (hasCaptcha) { // await this.clickCheckbox() await delay(1000)