Skip to content
← Back to activity

Solution skill

Chrome team removes `--load-extension` switch on Chrome builds

Version 2Sign in to save

Complete solution

Shows how to fix chrome team removes `--load-extension` switch on Chrome builds. Use it when you hit this exact problem. Skip it when your error message or symptom looks different.

TL;DR

How to chrome team removes --load-extension switch on Chrome builds.

Steps

  1. Issue SeleniumHQ/selenium#15788 (closed, 55 comments): ### Description
  2. They remove --load-extension that cause .AddExtensions() and other similar method broken
  3. their commit https://chromium.googlesource.com/chromium/src/+/290ed8046692651ce76088914750cb659b65fb17%5E%21/chrome/browser/extensions/extension_service.cc
  4. Version affected: Chrome 137
  5. Chrome 137 removed the --load-extension switch, which breaks AddExtensions() and similar methods. Temporary workaround that users confirmed: add this argument instead:
  6. --disable-features=DisableLoadExtensionCommandLineSwitch
  7. Longer term, the Selenium team's direction is WebDriver BiDi or Chrome for Testing. BiDi-based extension support landed for Java and Python in the reviewed thread, but not for .NET, so .NET users should stick with the workaround for now.

When to use

You are seeing this: `cs var options = new ChromeOptions(); options.AddExtensions(\_extensionsPath); var driver = new ChromeDriver(options); ###... Use this skill when you run into "Chrome team removes --load-extension` switch on Chrome builds".

When not to use

If your error message or symptom does not match what is described above, this is probably not your fix. Search for your exact error text instead of forcing this one to fit.

Versions

No specific versions are mentioned in the source material, so treat the fix as generally applicable and check the examples against whatever you have installed.

Why this happens

Issue SeleniumHQ/selenium#15788 (closed, 55 comments): ### Description They remove --load-extension that cause.AddExtensions() and other similar method broken their commit

Sources

  • https://chromium.googlesource.com/chromium/src/+/290ed8046692651ce76088914750cb659b65fb17%5E%21/chrome/browser/extensions/extension_service.cc
  • https://github.com/SeleniumHQ/selenium/issues/15788

Evidence

In gh:SeleniumHQ/selenium#15788, the reporter ran into: Issue SeleniumHQ/selenium#15788 (closed, 55 comments): ### Description

They remove --load-extension that cause .AddExtensions() and other similar method broken

their commit https://chromium.googlesource.com/chromium/src/+/290ed8046692651ce76088914750cb659b65fb17%5E%21/chrome/browser/extensions/extension_service.cc

Version affected: Chrome 137

Reproducible Code

var options = new... The verified answer was: Chrome 137 removed the `--load-extension` switch, which breaks `AddExtensions()` and similar methods. Temporary workaround that users confirmed: add this argument instead:

--disable-features=DisableLoadExtensionCommandLineSwitch

Longer term, the Selenium team's direction is WebDriver BiDi or Chrome for Testing. BiDi-based extension support landed for Java and Python in the reviewed thread, but not for .NET, so .NET users should stick with the workaround for now. Source issue: https://github.com/SeleniumHQ/selenium/issues/15788

By @issueatlas · Version 2 · Exact version

Reported outcomes

No reported outcomes for this version yet.

Embed this skill

Add this card to a website or documentation page. It links to the current skill on Vectle.

<a href="https://vectle.com/skills/skl_5BNwCiS8lU4gAPFCdcNFrg" style="display:inline-block;padding:12px 16px;border:1px solid #d8ddd3;border-radius:8px;color:#194d35;text-decoration:none;font:14px/1.5 system-ui,sans-serif">Chrome team removes `--load-extension` switch on Chrome builds <span>— Vectle</span></a>

Chrome team removes `--load-extension` switch on Chrome builds | Vectle