How to run protractor tests in IE where protractor

2019-09-14 19:43发布

问题:

I have protractor installed globally and am using this fine for chrome tests, I am now trying to get IE tests to run but am hitting issues when trying to get protractor to use the version of IE driver I have installed globally.

I see from the docs and various posts that you can supply a jvmArgs property in the protractor config file referencing the IE driver location. This I see has to be a relative path to the directory the config file lives in but for me protractor and the browser drivers are all installed globally, not within my node_modules folder local to my project.

What's the correct approach here? Should IE driver be installed locally, e.g. should I be installing webdriver-manager as a local npm module and installing IE driver that way so that the path in the jvmArgs resolves correctly?

It seems there are numerous posts out there where others have struggled to get IE to work out the box with protractor!

回答1:

There is nothing special when running tests using IE.

Just make sure that when you update your webdriver-manager and that IE is included.
This is the line I normally use when updating webdriver-manager.

webdriver-manager --ignore_ssl update --ie32

Make sure to update your conf.js as well

capabilities: {
    'browserName': 'internet explorer',
    'ignoreProtectedModeSettings': true
}