Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/node.js/42.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Angularjs 我可以让量角器使用节点_模块中安装的IEDriverServer.exe webdriver更新吗?_Angularjs_Node.js_Internet Explorer_Selenium Webdriver_Protractor - Fatal编程技术网

Angularjs 我可以让量角器使用节点_模块中安装的IEDriverServer.exe webdriver更新吗?

Angularjs 我可以让量角器使用节点_模块中安装的IEDriverServer.exe webdriver更新吗?,angularjs,node.js,internet-explorer,selenium-webdriver,protractor,Angularjs,Node.js,Internet Explorer,Selenium Webdriver,Protractor,我正在为我的angular web应用程序项目编写验收测试。它们通过量角器运行,在铬合金上运行良好。但是当我尝试在InternetExplorer11上运行它们时,我遇到了一个失败,抱怨“驱动程序可执行文件的路径必须由webdriver.ie.driver系统属性设置”。但是,我将我的项目配置为将IE驱动程序下载到与chromedriver可执行文件相同的位置 虽然我确信我可以将IE驱动程序excutable移动到存储在PATH env变量中的文件夹中,但是项目中的每个开发人员都必须执行相同的操

我正在为我的angular web应用程序项目编写验收测试。它们通过量角器运行,在铬合金上运行良好。但是当我尝试在InternetExplorer11上运行它们时,我遇到了一个失败,抱怨“驱动程序可执行文件的路径必须由webdriver.ie.driver系统属性设置”。但是,我将我的项目配置为将IE驱动程序下载到与chromedriver可执行文件相同的位置

虽然我确信我可以将IE驱动程序excutable移动到存储在PATH env变量中的文件夹中,但是项目中的每个开发人员都必须执行相同的操作,或者更新他们的路径以指向驱动程序

我的问题是-是否有一个简单的配置我错过了使这个IE驱动程序可供量角器就像铬的驱动程序

My package.json:

{
//...
"scripts": {
    "webdriver-update": "webdriver-manager update --ie",
    "preacceptance-tests": "npm run webdriver:update -- --standalone",
    "acceptance-tests": "protractor",
    //...
}
My progrator.conf.js:

exports.config = {
    baseUrl: 'http://localhost:3000/',
    specs: [
        'src/**/**test.ts',
        'src/**/*test.ts'
    ],
    capabilities: {
        'browserName': 'internet explorer' //If I put chrome here, the tests pass
    },
    onPrepare: function() {
        browser.ignoreSynchronization = true;
    },
    seleniumServerJar: "node_modules/protractor/selenium/selenium-server-standalone-2.51.0.jar",
    useAllAngular2AppRoots: true
};
我运行“npm运行验收测试”,chromedriver.exe和IEDriverServer.exe被下载到我的node_modules/dragrator/selenium文件夹中。量角器似乎知道chromedriver,但为什么它看不到IEDriverServer


除了手动将路径指向此文件夹外,我似乎在任何地方都找不到答案。如果量角器能找到铬驱动程序,我似乎不应该这么做。

据我检查硒源后所知,只有一种解决方法

如果当前工作目录中存在名为
IEDriverServer.exe
的可执行文件(该目录已明确选中,您可以使用
process.cwd()
查询),则将选择该实例,并跳过
路径
检查(错误消息有点误导)


您可以按照Selenium source和中的逻辑操作。

谢谢。我希望我能得到webpack.config.js文件,使该驱动程序可供量角器执行,但我不知道怎么做。我刚刚将node_modules/dragrator/selenium文件夹添加到我的路径中。