I suggest you make a test with the sample code below may help you to add the extension to the Edge browser using Selenium Java code.
I am using Edge 85.0.564.51 (Official build) (64-bit) for making this test and I am using CRX file of the Office extension in this sample code.
Java code:
public static void main(String[] args)
{
System.setProperty("webdriver.edge.driver","\\msedgedriver.exe");
EdgeOptions op=new EdgeOptions();
op.addExtensions(new File(".....Path_for_extension_here.....\\Office.crx"));
DesiredCapabilities capabilities = new DesiredCapabilities();
capabilities.setCapability(EdgeOptions.CAPABILITY, op);
op.merge(capabilities);
WebDriver browser = new EdgeDriver(op);
browser.get("https://your_URL_here...");
}
Output:
Further, you can modify the code sample as per your own requirements.
----------
If the response is helpful, please click "Accept Answer" and upvote it.
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.