feat: 新增脚本录制功能

This commit is contained in:
duanshuwen
2026-04-12 15:46:28 +08:00
parent 66bb07faf2
commit c16fc93685
38 changed files with 3336 additions and 51 deletions

View File

@@ -0,0 +1,18 @@
import { chromium } from 'playwright';
import { preparePage, safeDisconnectBrowser } from './common/tabs.js';
(async () => {
const browser = await chromium.connectOverCDP('http://127.0.0.1:9222');
const { page } = await preparePage(browser, {
targetUrl: 'about:blank',
});
// Example: navigate and click an element
// await page.goto('https://example.com');
// await page.click('text=Change Model');
console.log('Change model script executed');
await safeDisconnectBrowser(browser);
process.exit(0);
})();