File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -197,8 +197,10 @@ async function ensureBrowser(browserSettings?: BrowserSettings) {
197
197
browserInstance = chromium ;
198
198
break ;
199
199
}
200
+ // Read the Chrome executable path from the environment variable
201
+ const executablePath = process . env . PLAYWRIGHT_CHROME_EXECUTABLE_PATH || undefined ; // Fallback to default if not set
200
202
201
- browser = await browserInstance . launch ( { headless } ) ;
203
+ browser = await browserInstance . launch ( { headless, executablePath } ) ;
202
204
currentBrowserType = browserType ;
203
205
204
206
// Add cleanup logic when browser is disconnected
@@ -620,4 +622,4 @@ export function getScreenshots(): Map<string, string> {
620
622
return screenshotTool ?. getScreenshots ( ) ?? new Map ( ) ;
621
623
}
622
624
623
- export { registerConsoleMessage } ;
625
+ export { registerConsoleMessage } ;
You can’t perform that action at this time.
0 commit comments