feat: 飞猪自动化调试完成

This commit is contained in:
duanshuwen
2026-03-10 21:26:17 +08:00
parent 15a7d115cb
commit 8a6544ede2
7 changed files with 124 additions and 130 deletions

View File

@@ -1,7 +1,6 @@
import { chromium } from 'playwright';
import log from 'electron-log';
const checkLoginStatus = async (page) => {
try {
const currentUrl = await page.url();
@@ -33,7 +32,7 @@ const checkLoginStatus = async (page) => {
}
(async () => {
const browser = await chromium.connectOverCDP('http://localhost:9222');
const browser = await chromium.connectOverCDP(`http://localhost:9222`);
const context = browser.contexts()[0];
await context.addInitScript(() => {
@@ -127,4 +126,4 @@ const checkLoginStatus = async (page) => {
// await page.locator('div:nth-child(7) > .boardRow___p2ZiO > div:nth-child(2) > div:nth-child(2) > .ant-spin-nested-loading > .ant-spin-container > div > div > .error___IM8Yw > .bar___i4k4r').click();
// await page.locator('div:nth-child(7) > .boardRow___p2ZiO > div:nth-child(2) > div:nth-child(3) > .ant-spin-nested-loading > .ant-spin-container > div > div > .error___IM8Yw > .bar___i4k4r').click();
// await page.locator('div:nth-child(7) > .boardRow___p2ZiO > div:nth-child(2) > div:nth-child(4) > .ant-spin-nested-loading > .ant-spin-container > div > div > .error___IM8Yw > .bar___i4k4r').click();
})();
})();