Honor configured browser engine
This commit is contained in:
@@ -58,13 +58,7 @@ function launchBrowser(engine, headless) {
|
||||
...(executablePath ? { executablePath } : {}),
|
||||
};
|
||||
|
||||
return browserType.launch(options).catch((error) => {
|
||||
if (normalizedEngine !== "firefox") throw error;
|
||||
|
||||
const chromiumPath = resolveSystemBrowser("chromium");
|
||||
if (!chromiumPath) throw error;
|
||||
return chromium.launch({ headless, timeout: 10_000, executablePath: chromiumPath });
|
||||
});
|
||||
return browserType.launch(options);
|
||||
}
|
||||
|
||||
function resolveSystemBrowser(engine) {
|
||||
|
||||
Reference in New Issue
Block a user