ericmckean / chromedriver

Automatically exported from code.google.com/p/chromedriver
0 stars 0 forks source link

Chrome Extensions no longer work #828

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
I was attempting to use Chrome Extensions, and it was working last month. 
However, Chrome just updated and won't let my old way work. So, now I'm 
attempting to get a Chrome Profile to work.

RE: https://sites.google.com/a/chromium.org/chromedriver/extensions
   This method no longer works as chrome loads and identifies the extension as malicious and disables it.

What steps will reproduce the problem?
1. Add an extension using switches such as:
capabilities = $RC_browser
            if $RC_browser == :chrome
                chrome_switches = %w[--enable-logging --v=1 --disable-popup-blocking --disable-extensions-file-access-check --always-authorize-plugins --disable-improved-download-protection --allow-file-access --load-extension='C:\Users\Julie\AppData\Local\Google\Chrome\User Data\glazr\Default\Extensions\ebkmpldddbffabdofmmmehcpdhncfoee']
                caps_opts = {'chrome.switches' => chrome_switches}
                capabilities = Selenium::WebDriver::Remote::Capabilities.chrome(caps_opts)
                capabilities["browser"] = "chrome"
                capabilities['os'] = 'Windows'
                capabilities['os_version'] = '8.1'
                capabilities['browser_version'] = '34.0.1847.137'
                capabilities['resolution'] = '1280x1024'
                capabilities["browserstack.debug"] = "true"
                capabilities["speed"] = 1
            end
        #==============
        $driver = Selenium::WebDriver.for(:remote,
                                            :url => $RC_server,
                                            :desired_capabilities => caps)
2. Attempt to run webdriver
3. A message comes up stating that the added extension is unsafe and not 
located in the webstore.

What is the expected output? What do you see instead?
Able to add and use extensions

Selenium version: selenium-server-standalone-2.42.2
OS: Win 8 and Win 7
Browser: Chrome
Browser version: 35.0.1916.153 m

Is there any other way to get a chrome extension in. I've seen Chromium 2 
documentation, but I also see bugs filed stating the extensions don't work in 
that format either.

Original issue reported on code.google.com by jam....@gmail.com on 17 Jun 2014 at 7:02

GoogleCodeExporter commented 9 years ago

Original comment by samu...@chromium.org on 21 Feb 2015 at 12:18

GoogleCodeExporter commented 9 years ago
I was able to load an extension. Issue is not reproducible.

System.setProperty("webdriver.chrome.driver", 
"/usr/local/google/home/gmanikpure/Downloads/chromedriver");

ChromeOptions options = new ChromeOptions();
 options.addExtensions(new File("/usr/local/google/home/gmanikpure/Downloads/extension_1_0_13.crx"));
                DesiredCapabilities capabilities = new DesiredCapabilities();
                capabilities.setCapability(ChromeOptions.CAPABILITY, options);
                ChromeDriver driver = new ChromeDriver(capabilities);

                  driver.get("https://gmail.com/");
                  Thread.sleep(3000);
 driver.get("chrome://extensions/"); // here extension can be seen as loaded properly

My configurations:-
[A]
 Linux ubuntu
 Selenium version – 2.44
 Chromedriver version – 2.14
 Chrome browser version – 40.0.2214.115 (64-bit)
 Java – 7

[B]
Windows 8.1
Chromedriver 2.14
Selenium version – 2.44
Java 8
Chrome browser - 41.0.2272.64(64-bit)

Can you please try again and please let us know if it differs from you are doing

Original comment by gmanikp...@chromium.org on 5 Mar 2015 at 12:50

Attachments: