feat: 浏览器自动化操作开发

This commit is contained in:
DEV_DSW
2026-03-03 17:05:13 +08:00
parent d99f1dd98e
commit 20e825215f
18 changed files with 495 additions and 68 deletions

View File

@@ -0,0 +1,17 @@
// 启动本地Chrome
export function getChromePath () {
if (process.platform === 'win32') {
// "C:\Program Files\Google\Chrome\Application\chrome.exe"
return 'C:\\Program Files\\Google\\Chrome\\Application\\chrome.exe';
}
if (process.platform === 'darwin') {
return '/Applications/Google Chrome.app/Contents/MacOS/Google Chrome';
}
if (process.platform === 'linux') {
return 'google-chrome';
}
}