Skip to content

Commit

Permalink
Fix chromium-based browsers not working
Browse files Browse the repository at this point in the history
  • Loading branch information
cezaraugusto committed Nov 18, 2024
1 parent 58f5582 commit 775a6ed
Showing 1 changed file with 11 additions and 12 deletions.
23 changes: 11 additions & 12 deletions programs/develop/plugin-browsers/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -98,16 +98,8 @@ export class BrowsersPlugin {
...customUserConfig
}

if (browserConfig?.chromiumBinary) {
console.log(
messages.isUsingBrowserBinary('chromium', browserConfig?.chromiumBinary)
)
}

if (typeof browserConfig?.open !== 'undefined') {
console.log(
messages.isBrowserLauncherOpen(this.browser, browserConfig?.open)
)
if (browserConfig?.open === false) {
console.log(messages.isBrowserLauncherOpen(this.browser, false))
}

if (browserConfig?.startingUrl) {
Expand All @@ -118,24 +110,29 @@ export class BrowsersPlugin {
)
)
}

if (browserConfig?.chromiumBinary) {
console.log(
messages.isUsingBrowserBinary('chromium', browserConfig?.chromiumBinary)
)
}

if (browserConfig?.geckoBinary) {
console.log(
messages.isUsingBrowserBinary('gecko', browserConfig?.geckoBinary)
)
}

if (browserConfig?.profile) {
console.log(
messages.isUsingProfile(browserConfig?.browser, browserConfig?.profile)
)
}

if (browserConfig?.preferences) {
console.log(messages.isUsingPreferences(browserConfig?.browser))
}

if (browserConfig?.browserFlags && browserConfig?.browserFlags.length > 0) {
console.log(messages.isUsingBrowserFlags(browserConfig?.browser))
}
Expand All @@ -155,6 +152,7 @@ export class BrowsersPlugin {
case 'chromium-based': {
new RunChromiumPlugin({
...browserConfig,
browser: this.browser,
profile
}).apply(compiler)
break
Expand All @@ -164,15 +162,16 @@ export class BrowsersPlugin {
case 'gecko-based':
new RunFirefoxPlugin({
...browserConfig,
browser: this.browser,
profile
}).apply(compiler)
break

default: {
new RunChromiumPlugin({
...browserConfig,
profile,
browser: 'chrome'
browser: 'chrome',
profile
}).apply(compiler)
break
}
Expand Down

0 comments on commit 775a6ed

Please sign in to comment.