title: Unable to open chrome browser using Selenium Webdriver. Loading unpacked extensions are disabled by administrator
body: <p>I am automating my application using Selenium Webdriver, C#, Visual Studio and Chrome browser.</p>
  
  <p>I am getting below popup when selenium tried to open the chrome browser.</p>
  
  <pre><code>Failed to load extension from:C:\Users\VARA~1.PAK\AppData\Local\Temp\scoped_dir6712_14913\internal.
  Loading of unpacked extensions is disabled by the administrator.
  </code></pre>
  
  <p>Once I click on OK button of the popup, Chrome is opening successfully but my test is failing due to below error.</p>
  
  <pre><code>Test Name:  _3_EnterDetailsAndSelectAnAddress_John
  Test FullName:  Veolia.BrentGWP.UserStories.Features.BrentGWPFeature._3_EnterDetailsAndSelectAnAddress_John
  Test Source:     : line 2147483647
  Test Outcome:   Failed
  Test Duration:  0:00:47.8059413
  
  Result Message: 
  Test method Veolia.BrentGWP.UserStories.Features.BrentGWPFeature._3_EnterDetailsAndSelectAnAddress_John threw exception: 
  System.InvalidOperationException: unknown error: cannot get automation extension
  from unknown error: page could not be found: chrome-extension://aapnijgdinlhnhlmodcfapnahmbfebeb/_generated_background_page.html
    (Session info: chrome=41.0.2272.118)
    (Driver info: chromedriver=2.9.248315,platform=Windows NT 6.1 SP1 x86_64)
  Assert.Fail failed. Please check through the execution report against scenario
  Result StackTrace:  
  at OpenQA.Selenium.Remote.RemoteWebDriver.UnpackAndThrowOnError(Response errorResponse)
     at OpenQA.Selenium.Remote.RemoteWebDriver.Execute(String driverCommandToExecute, Dictionary`2 parameters)
     at OpenQA.Selenium.Remote.RemoteWebDriver.InternalExecute(String driverCommandToExecute, Dictionary`2 parameters)
     at OpenQA.Selenium.Remote.RemoteWindow.Maximize()
     at Veolia.Libraries.Driver.BeforeScenario() in c:\development\Veolia.Web.Brent\development\testing\Automation\Veolia.test.Framework\Libraries\Driver.cs:line 105
     at lambda_method(Closure , IContextManager )
     at TechTalk.SpecFlow.Bindings.BindingInvoker.InvokeBinding(IBinding binding, IContextManager contextManager, Object[] arguments, ITestTracer testTracer, TimeSpan&amp; duration)
     at TechTalk.SpecFlow.Bindings.BindingInvokerExtensions.InvokeHook(IBindingInvoker invoker, IHookBinding hookBinding, IContextManager contextManager, ITestTracer testTracer)
     at TechTalk.SpecFlow.Infrastructure.TestExecutionEngine.FireEvents(HookType bindingEvent)
     at TechTalk.SpecFlow.Infrastructure.TestExecutionEngine.FireScenarioEvents(HookType bindingEvent)
     at TechTalk.SpecFlow.Infrastructure.TestExecutionEngine.OnScenarioStart(ScenarioInfo scenarioInfo)
     at TechTalk.SpecFlow.TestRunner.OnScenarioStart(ScenarioInfo scenarioInfo)
     at Veolia.BrentGWP.UserStories.Features.BrentGWPFeature.ScenarioSetup(ScenarioInfo scenarioInfo) in c:\development\Veolia.Web.Brent\development\testing\Automation\Veolia.test.Framework\BrentGWP\UserStories\Features\AddressSearch.feature.cs:line 0
     at Veolia.BrentGWP.UserStories.Features.BrentGWPFeature._3_EnterDetailsAndSelectAnAddress(String firstname, String lastname, String postcode, String email, String phoneNumber, String[] exampleTags) in c:\development\Veolia.Web.Brent\development\testing\Automation\Veolia.test.Framework\BrentGWP\UserStories\Features\AddressSearch.feature:line 16
     at Veolia.BrentGWP.UserStories.Features.BrentGWPFeature._3_EnterDetailsAndSelectAnAddress_John() in c:\development\Veolia.Web.Brent\development\testing\Automation\Veolia.test.Framework\BrentGWP\UserStories\Features\AddressSearch.feature.cs:line 0
  </code></pre>
  
  <p>Every time selenium open chrome it will load automation extension into chrome to work with it.</p>
  
  <p>But in our organization we are using google mail and our IT department blocked adding extensions(third party and unpacked) to Chrome browser for security reasons.</p>
  
  <p>If I modified the registry to allow third party extensions, test is executing successfully. But our IT department updates the policy every day on every system(automated).</p>
  
  <p>I tried using <code>AddExtension</code> and <code>AddArgument</code> methods of <code>ChromeOptions</code> class, but none of them worked and got the same error.</p>
  
  <p>Can someone help me to overcome this issue?</p>