print to console and files
This commit is contained in:
@@ -16,6 +16,7 @@ const appointmentLogger = createLogger({
|
|||||||
myFormat
|
myFormat
|
||||||
),
|
),
|
||||||
transports: [
|
transports: [
|
||||||
|
new transports.Console(),
|
||||||
new transports.File({filename: path.join(homedir, "appointment_" + formatDate(new Date()) + ".log")}),
|
new transports.File({filename: path.join(homedir, "appointment_" + formatDate(new Date()) + ".log")}),
|
||||||
],
|
],
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -35,11 +35,11 @@ const CAPTCHA_ERROR_MESSAGE_FR = "La vérification du captcha a échoué"
|
|||||||
REGEX_RDV_URL = "https:\/\/rendezvousparis\.hermes\.com\/client\/register\/[A-Z0-9]+"
|
REGEX_RDV_URL = "https:\/\/rendezvousparis\.hermes\.com\/client\/register\/[A-Z0-9]+"
|
||||||
const DEFAULT_STORE = 'faubourg';
|
const DEFAULT_STORE = 'faubourg';
|
||||||
|
|
||||||
function delay(delayInms) {
|
function delay(delayInMs) {
|
||||||
return new Promise(resolve => {
|
return new Promise(resolve => {
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
resolve(2);
|
resolve(2);
|
||||||
}, delayInms);
|
}, delayInMs);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -324,7 +324,7 @@ class CommandorPage {
|
|||||||
let audioBtn = await this.page.frameLocator("iframe").locator("#captcha__audio__button");
|
let audioBtn = await this.page.frameLocator("iframe").locator("#captcha__audio__button");
|
||||||
if (audioBtn) {
|
if (audioBtn) {
|
||||||
log("audioBtn found")
|
log("audioBtn found")
|
||||||
audioBtn.click()
|
// audioBtn.click()
|
||||||
} else {
|
} else {
|
||||||
log("audioBtn not found")
|
log("audioBtn not found")
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user