How to start Google Chrome with custom extensions loaded using intern-runner

爷,独闯天下 提交于 2019-12-24 06:53:59

问题


The question is pretty straightforward. I'm testing a website that requires a custom extension, but intern-runner opens up a Chrome instance without any extensions loaded other than the one required for automation.

I'm even willing to modify the .js source of intern if anyone can point me which files to inspect.


回答1:


Extensions are passed to ChromeDriver via capabilities.

define({
  environments: [
    {
      browserName: 'chrome',
      chromeOptions: {
        extensions: [ 'base64-encoded crx file' ]
      }
    }
  ]
});


来源:https://stackoverflow.com/questions/24916555/how-to-start-google-chrome-with-custom-extensions-loaded-using-intern-runner

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!