Can not load “IE”, it is not registered! error mes

2019-03-22 18:04发布

I'm using karma to run my js tests on multiple browsers. the test works on Chrome & Firefox but I can't activate them on IE.

I'm getting the following error message:

Can not load "IE", it is not registered! Perhaps you are missing some plugin?

On my config file

SET CHROME_BIN=c:\Program Files (x86)\Google\Chrome\Application\chrome.exe  
SET FIREFOX_BIN=C:\Program Files (x86)\Mozilla Firefox\firefox.exe  
SET IE_BIN=C:\Program Files\Internet Explorer\iexplore.exe  

I also tried this

SET IE_BIN=C:\Program Files (86)\Internet Explorer\iexplore.exe  

I already installed karma-ie-launcher.

Can you help me?

7条回答
家丑人穷心不美
2楼-- · 2019-03-22 18:06

In the configuration file for your project (e.g. karma.config.js), check if you have the plugins listed

plugins : [
    'karma-junit-reporter',
    'karma-chrome-launcher',
    'karma-firefox-launcher',
    'karma-opera-launcher',
    'karma-ie-launcher',
    'karma-jasmine'
    ],
查看更多
欢心
3楼-- · 2019-03-22 18:13

After installing the karma ie launcher, replace the index.js from the following file

https://github.com/karma-runner/karma-ie-launcher/pull/9

Please let me know if it does not work.

查看更多
叛逆
4楼-- · 2019-03-22 18:20

You have to install the IE launcher, from your project directory where you have installed karma, install ie launcher:

$ npm install karma-ie-launcher

That should create a karma-ie-launcher folder under node_modules(default karma installation folder). Mind that 'plugins:[]' configuration simply instruct Karma what to load, you still have to install the browser launchers if you have not done so in initial Karma installation.

查看更多
欢心
5楼-- · 2019-03-22 18:21

Running karma locally worked for me.

./node_modules/karma/bin/karma start

查看更多
聊天终结者
6楼-- · 2019-03-22 18:23

Amend Package.Json

I had a similar problem with Chrome. After setting the environment variables as you did, what eventually worked was ensuring the following following entries with the specified version numbers in the package.json's devDependencies:

"karma-jasmine": "~0.2.2",
"karma-chrome-launcher": "~0.1.2",

Then perform:

npm update
查看更多
我命由我不由天
7楼-- · 2019-03-22 18:27

Try wrapping your paths in quotes, e.g.:

SET IE_BIN="C:\Program Files (86)\Internet Explorer\iexplore.exe"

Also, make sure you've installed and configured Karma IE launcher.

查看更多
登录 后发表回答