刚开始使用聚合物和单元测试。我正在尝试此页面https://www.polymer-project.org/2.0/docs/tools/tests上的活动,但我无法运行polymer test
。所以我尝试运行polymer test --verbose
并最终收到此错误:
Error: Selenium server did not start.Another Selenium process may already be running or your java version may be out of date.
error: cli runtime exception: Error: Selenium server did not start.Another Selenium process may already be running or your java version may be out of date.
error: Error: Selenium server did not start.Another Selenium process may already be running or your java version may be out of date.
at ChildProcess.errorIfNeverStarted (C:\Users\Eleonor Somosot\AppData\Roaming\npm\node_modules\polymer-cli\node_modules\selenium-standalone\lib\start.js:141:15)
at emitTwo (events.js:106:13)
at ChildProcess.emit (events.js:191:7)
at Process.ChildProcess._handle.onexit (internal/child_process.js:215:12)
希望有人可以帮助我解决这个问题。感谢..
答案 0 :(得分:2)
点击以下网址关闭已经在4444端口运行selenium服务器。
http://localhost:4444/selenium-server/driver/?cmd=shutDownSeleniumServer
如果selenium服务器已在端口4444上运行,那么它将关闭服务器并说明如果selenium没有在此端口4444上运行,那么通过点击上面的url会给你“无法连接”
如果没有服务器正在运行,则调试出java版本的原因。确保您运行的是java 7或更高版本:
java -version