i am trying to open webDriver with chrome extension (Modify header value) using below code
ChromeOptions options = new ChromeOptions();
options.addExtensions(new File("/path/to/extension.crx"));
DesiredCapabilities capabilities = new DesiredCapabilities();
capabilities.setCapability(ChromeOptions.CAPABILITY, options);
ChromeDriver driver = new ChromeDriver(capabilities);
but this code is opening the webDriver instance with the extention in another window can any one know how to invoke it with chrome extension not in a new tab.