can send appointment request

This commit is contained in:
2022-09-07 19:38:29 +02:00
parent 6266083ab8
commit b0d52afc00
5 changed files with 74 additions and 72 deletions
+11 -11
View File
@@ -1,10 +1,7 @@
const {_android: android} = require('playwright');
const ExcelUtil = require("./src/excel/ExcelUtil");
const CommandorPage = require("./src/workers/CommandorPage");
const RDV_URL = "https://rendezvousparis.hermes.com/client/register";
// const RDV_URL = "https://bot.sannysoft.com/";
// const RDV_URL = "http://192.168.0.44:8000/test_appointment.html"
const MongoManager = require("./src/workers/mongo_manager");
function delay(delayInms) {
return new Promise(resolve => {
@@ -14,15 +11,18 @@ function delay(delayInms) {
});
}
const mongoManager = new MongoManager();
mongoManager.connect()
let excelUtil = new ExcelUtil();
let contactList = excelUtil.readContacts();
let commandor = new CommandorPage(contactList[2]);
// (async () => {
(async () => {
// Connect to the device.
const [device] = await android.devices();
console.log(`Model: ${device.model()}`);
console.log(`Serial: ${device.serial()}`);
const [device] = await android.devices();
console.log(`Model: ${device.model()}`);
console.log(`Serial: ${device.serial()}`);
let commandor = new CommandorPage(contactList[3], device, mongoManager);
//read contacts form excel
await commandor.loadPage();
await commandor.loadPage();
// Take screenshot of the whole device.
// })();
})();