使用docker时Selenium未运行

时间:2019-04-23 10:14:23

标签: selenium docker asp.net-core

1。在VS中创建项目

2。创建一个配置了(java,npm,nightwatch)一切的docker文件

3。在powershell中,导航到../../ Blogplayground.E2ETest

4。输入npm run test:chrome

5。单击Enter键

实际行为: 启动Web应用程序。日志位于:test-results/server.log 正在启动硒服务器...已启动-PID:286

[0烟雾测试]测试套件

从硒服务器检索新会话时出错

Connection refused! Is selenium server started?
{ value:
   { message:
      "unknown error: cannot find Chrome binary\n  (Driver info: chromedriver=2.46.628388 (4a34a70827ac54148e092aafb70504c4ea7ae926),platform=Linux 4.9.93-linuxkit-aufs x86_64) (WARNING: The server did not provide any stacktrace information)\nCommand duration or timeout: 62 milliseconds\nBuild info: version: '3.8.1', revision: '6e95a6684b', time: '2017-12-01T19:05:32.194Z'\nSystem info: host: '8e22f863d5da', ip: '172.22.0.2', os.name: 'Linux', os.arch: 'amd64', os.version: '4.9.93-linuxkit-aufs', java.version: '1.8.0_212'\nDriver info: driver.version: unknown",
     error: 'unknown error' },
  status: 13 }

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! blogplayground.e2etest@1.0.0 test:chrome: `nightwatch --config ./nightwatch.config.js --env chrome`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the blogplayground.e2etest@1.0.0 test:chrome script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /root/.npm/_logs/2019-04-23T05_48_27_299Z-debug.log

预期的行为: 测试应该运行

0 个答案:

没有答案