Skip to content

Commit

Permalink
fix: convert browser name to lower case when applying headless
Browse files Browse the repository at this point in the history
  • Loading branch information
KuznetsovRoman committed Nov 20, 2024
1 parent 77490c9 commit 2da7787
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/browser/new-browser.ts
Original file line number Diff line number Diff line change
Expand Up @@ -180,8 +180,8 @@ export class NewBrowser extends Browser {
if (!headless) {
return capabilities;
}
const capabilitySettings =
headlessBrowserOptions[capabilities.browserName as keyof typeof headlessBrowserOptions];
const browserNameLowerCase = capabilities.browserName?.toLocaleLowerCase() as string;
const capabilitySettings = headlessBrowserOptions[browserNameLowerCase];
if (!capabilitySettings) {
warn(`WARNING: Headless setting is not supported for ${capabilities.browserName} browserName`);
return capabilities;
Expand Down

0 comments on commit 2da7787

Please sign in to comment.