feat: 浏览器自动化操作开发
This commit is contained in:
17
src/main/utils/chrome/getChromePath.ts
Normal file
17
src/main/utils/chrome/getChromePath.ts
Normal 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';
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user