From 2da778773113cb6bec463f6d6c9a6317e8c67ed1 Mon Sep 17 00:00:00 2001 From: Roman Kuznetsov Date: Wed, 20 Nov 2024 11:16:16 +0300 Subject: [PATCH] fix: convert browser name to lower case when applying headless --- src/browser/new-browser.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/browser/new-browser.ts b/src/browser/new-browser.ts index 3fdb29f4f..58f27c8ff 100644 --- a/src/browser/new-browser.ts +++ b/src/browser/new-browser.ts @@ -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;