量角器/硒“找不到 chromedriver"(在 Windows 上) [英] protractor/selenium "could not find chromedriver at" (on Windows)
问题描述
我按照 本教程安装了量角器,当我使用 webdriver-经理更新它说:
I installed protractor following this tutorial and when i use webdriver-manager update it says:
selenium standalone is up to date.
chromedriver is up to date.
当我尝试运行量角器测试时,它说:
thou when i try to run the protractor tests, it says:
C:Users****AppDataRoaming
pm
ode_modulesprotractorlibdriverProviderslocal.dp.js:42
throw new Error('Could not find chromedriver at ' +
^
Error: Could not find chromedriver at C:Users****AppDataRoaming
pm
ode_modulesprotractorseleniumchromedriver.exe
at LocalDriverProvider.addDefaultBinaryLocs_ (C:Users****AppDataRoaming
pm
ode_modulesprotractorlibdriverProviderslocal.dp.js:42:15)
at LocalDriverProvider.setupEnv (C:Users****AppDataRoaming
pm
ode_modulesprotractorlibdriverProviderslocal.dp.js:59:8)
at Runner.run (C:Users****AppDataRoaming
pm
ode_modulesprotractorlib
unner.js:308:31)
at process.<anonymous> (C:Users****AppDataRoaming
pm
ode_modulesprotractorlib
unFromLauncher.js:32:14)
at process.EventEmitter.emit (events.js:98:17)
at handleMessage (child_process.js:318:10)
at Pipe.channel.onread (child_process.js:345:11)
[launcher] Runner Process Exited With Error Code: 8
我检查了 local.dp.js 并看到它试图从 .. ode_modulesprotractorseleniumchromedriver 加载 chromedriver,但只有一个名为 chromedriver_2.9 的空 zip 文件.
I checked the local.dp.js and saw that it tried to load the chromedriver from .. ode_modulesprotractorseleniumchromedriver but there only was an empty zip file called chromedriver_2.9.
所以我手动下载了chromedriver并将其复制到这个位置,产生了一个新的错误:
So i downloaded the chromedriver manually and copied it to this location, producing a new error:
C:Users****AppDataRoaming
pm
ode_modulesprotractor
ode_modulesselenium-webdriverlibwebdriverpromise.js:1549
throw error;
^
Error: Server exited with 1
at Error (<anonymous>)
at ChildProcess.onServerExit (C:Users****AppDataRoaming
pm
ode_modulesprotractor
ode_modulesselenium-webdriver
emoteindex.js:193:11)
at ChildProcess.g (events.js:180:16)
at ChildProcess.EventEmitter.emit (events.js:98:17)
at Process.ChildProcess._handle.onexit (child_process.js:797:12)
[launcher] Runner Process Exited With Error Code: 8
有人有什么想法吗?
推荐答案
如果你在代理后面,那么先尝试设置代理,然后运行 webdriver update:
If you are behind a proxy then try setting proxy first and then run webdriver update:
npm config set proxy http://<proxy.com>:port
webdriver-manager update
这篇关于量角器/硒“找不到 chromedriver"(在 Windows 上)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!