feat: 飞猪自动化调试完成
This commit is contained in:
@@ -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();
|
||||
})();
|
||||
})();
|
||||
Reference in New Issue
Block a user