1

We have a suite of tests that use Selenium to spawn Chrome instances when run locally. The Chrome instance that gets spawned is a completely vanilla profile with no extensions installed. For debugging purposes it would be useful to have the React & Redux dev tools extensions installed.

Is there a way to configure Selenium to install/enable extensions in the Chrome profile it spawns?

In an ideal world it wouldn't do a full install of the extension every time, but use a locally cached CRX file.

Thanks in advance for any help

jolyonruss
  • 1,770
  • 2
  • 19
  • 34
  • this question is asked very often. So did you look up the existing answers? something is not working in how the propose to do things? e.g. https://stackoverflow.com/questions/34222412/load-chrome-extension-using-selenium or using existing profile: https://stackoverflow.com/questions/14480717/load-chrome-profile-using-selenium-webdriver-using-java – timbre timbre Oct 04 '18 at 16:14

1 Answers1

0

@Kiril is right in saying that this question is asked often. You should do a thorough search before posting.

If you are using Javascript+ Selenium do something like this :

chromeOptions = {
    'args': ['--test-type',
             '--start-maximized',
             'use-fake-ui-for-media-stream',],
    'extensions': [encode(path.join(__dirname , '/your ext path/yourextention.crx'))],

};
Pramod
  • 768
  • 1
  • 12
  • 27