28 lines
904 B
JavaScript
28 lines
904 B
JavaScript
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"
|
|
|
|
function delay(delayInms) {
|
|
return new Promise(resolve => {
|
|
setTimeout(() => {
|
|
resolve(2);
|
|
}, delayInms);
|
|
});
|
|
}
|
|
|
|
let excelUtil = new ExcelUtil();
|
|
let contactList = excelUtil.readContacts();
|
|
let commandor = new CommandorPage(contactList[2]);
|
|
// (async () => {
|
|
// Connect to the device.
|
|
const [device] = await android.devices();
|
|
console.log(`Model: ${device.model()}`);
|
|
console.log(`Serial: ${device.serial()}`);
|
|
//read contacts form excel
|
|
await commandor.loadPage();
|
|
// Take screenshot of the whole device.
|
|
// })();
|