-
-
Notifications
You must be signed in to change notification settings - Fork 8.6k
Open
Labels
A-needs-triagingA Selenium member will evaluate this soon!A Selenium member will evaluate this soon!C-javaJava BindingsJava BindingsD-chromeI-defectSomething is not working as intendedSomething is not working as intendedOS-windows
Description
Description
With Chrome 140+, --load-extension is no longer supported.
We migrated to Selenium BiDi WebExtension APIs to install a Chrome extension.
The extension installs successfully and the inline menu opens.
However, during extension authentication:
- Clicking "Unlock / Authenticate" opens a new extension window (expected)
- The authentication code SHOULD be visible immediately
- Instead, the window shows a red error state
- After manually refreshing the window, the auth code appears
- This breaks automation logic because the content is not available on first load
This issue only occurs when the extension is installed via BiDi.
The same flow worked correctly earlier using --load-extension.
OS: Windows
Java: 17
Selenium: 4.40.0
Chrome: 140+
ChromeDriver: Matching Chrome version
WebDriverManager: 6.3.3
Reproducible Code
case "chrome":
String chromeExtensionPath = extensionPath + "\\Chrome";
System.out.println("Loading Chrome extension from: " + chromeExtensionPath); // Debug
ChromeOptions chromeOptions = new ChromeOptions();
chromeOptions.addArguments("--disable-features=IsolateOrigins,site-per-process");
chromeOptions.addArguments("--disable-site-isolation-trials");
chromeOptions.addArguments("--disable-web-security");
chromeOptions.addArguments("--user-data-dir=C:/Temp/ChromeProfile");
chromeOptions.setCapability("webSocketUrl", true);
chromeOptions.addArguments("--enable-unsafe-extension-debugging");
chromeOptions.addArguments("start-maximized");
chromeOptions.addArguments("--remote-debugging-pipe") ;
chromeOptions.addArguments("--disable-features=DisableLoadExtensionCommandLineSwitch");
chromeOptions.setExperimentalOption("enableExtensionTargets", true);
WebDriverManager.chromedriver().setup();
browserDriver = new ChromeDriver(chromeOptions);
WebExtension extension = new WebExtension(browserDriver);
Map<String, Object> extensionResult = null;
System.out.println("Installing extension from: " + extensionPath);
extensionResult = extension.install(
new InstallExtensionParameters(new ExtensionPath(chromeExtensionPath) );
break;ℹ️ Last known working version: 4.40.0
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
A-needs-triagingA Selenium member will evaluate this soon!A Selenium member will evaluate this soon!C-javaJava BindingsJava BindingsD-chromeI-defectSomething is not working as intendedSomething is not working as intendedOS-windows