问题
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