如何在全局安装了量角器的IE中运行量角器测试 [英] How to run protractor tests in IE where protractor is installed globally

查看:96
本文介绍了如何在全局安装了量角器的IE中运行量角器测试的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经在全球范围内安装了量角器,并且正在对chrome测试使用此功能,我现在正尝试运行IE测试,但是在试图使量角器使用我已全局安装的IE驱动程序版本时遇到了问题.

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.

我从文档和各种文章中看到,您可以在量角器配置文件中提供IE驱动程序位置的jvmArgs属性.我认为这必须是配置文件所在目录的相对路径,但对我来说,量角器和浏览器驱动程序都是全局安装的,而不是位于项目本地的node_modules文件夹中.

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.

这里正确的方法是什么? IE驱动程序是否应在本地安装,例如我应该将webdriver-manager安装为本地npm模块并以这种方式安装IE驱动程序,以便jvmArgs中的路径正确解析吗?

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?

似乎那里有很多帖子,其他人都在努力让IE与量角器一起工作!

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

推荐答案

使用IE运行测试时没有什么特别的地方.

There is nothing special when running tests using IE.

只需确保在更新webdriver-manager时已包含IE.
这是我在更新webdriver-manager时通常使用的行.

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

确保也更新conf.js

Make sure to update your conf.js as well

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

这篇关于如何在全局安装了量角器的IE中运行量角器测试的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆