update function power
This commit is contained in:
parent
374edd8eda
commit
f885c9e6a1
|
|
@ -17,10 +17,8 @@ const { addLogFunction } = require("./addLogFunctionJS");
|
||||||
const client = await zulip(config);
|
const client = await zulip(config);
|
||||||
const page = await browser.newPage();
|
const page = await browser.newPage();
|
||||||
|
|
||||||
// Điều hướng đến trang web chứa thẻ <a>
|
|
||||||
await page.goto("https://www.cskh.evnspc.vn/TraCuu/LichNgungGiamCungCapDien");
|
await page.goto("https://www.cskh.evnspc.vn/TraCuu/LichNgungGiamCungCapDien");
|
||||||
|
|
||||||
// Tìm thẻ <a> cần click dựa trên selector CSS hoặc XPath
|
|
||||||
const selectBoxSelector1 = "select#idCongTyDienLuc";
|
const selectBoxSelector1 = "select#idCongTyDienLuc";
|
||||||
await page.waitForSelector(selectBoxSelector1);
|
await page.waitForSelector(selectBoxSelector1);
|
||||||
await page.select(selectBoxSelector1, "PB11");
|
await page.select(selectBoxSelector1, "PB11");
|
||||||
|
|
@ -77,7 +75,7 @@ const { addLogFunction } = require("./addLogFunctionJS");
|
||||||
"/home/Log_service/app/store/logsAPI/" +
|
"/home/Log_service/app/store/logsAPI/" +
|
||||||
moment(Date.now()).format("DD_MM_YYYY").toString() +
|
moment(Date.now()).format("DD_MM_YYYY").toString() +
|
||||||
".log";
|
".log";
|
||||||
|
|
||||||
addLogFunction(fileName, JSON.stringify(params, null, 2), "powerSchedule")
|
addLogFunction(fileName, JSON.stringify(params, null, 2), "powerSchedule")
|
||||||
}, 5000);
|
}, 5000);
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue