Если я удаляю опцию безголовых, я получаю это:
> googlesearch@1.0.0 test /root/test
> mocha test --reporter mochawesome --reporter-options autoOpen=true
Google search automated testing
1) "before each" hook for "find the input box and google search button"
2) "after each" hook for "find the input box and google search button"
0 passing (456ms)
2 failing
1) Google search automated testing
"before each" hook for "find the input box and google search button":
WebDriverError: unknown error: Chrome failed to start: exited abnormally
(unknown error: DevToolsActivePort file doesn't exist)
(The process started from chrome location /usr/bin/google-chrome is no longer running, so ChromeDriver is assuming that Chrome has crashed.)
at Object.throwDecodedError (node_modules/selenium-webdriver/lib/error.js:550:15)
at parseHttpResponse (node_modules/selenium-webdriver/lib/http.js:563:13)
at Executor.execute (node_modules/selenium-webdriver/lib/http.js:489:26)
at processTicksAndRejections (internal/process/task_queues.js:93:5)
2) Google search automated testing
"after each" hook for "find the input box and google search button":
WebDriverError: unknown error: Chrome failed to start: exited abnormally
(unknown error: DevToolsActivePort file doesn't exist)
(The process started from chrome location /usr/bin/google-chrome is no longer running, so ChromeDriver is assuming that Chrome has crashed.)
at Object.throwDecodedError (node_modules/selenium-webdriver/lib/error.js:550:15)
at parseHttpResponse (node_modules/selenium-webdriver/lib/http.js:563:13)
at Executor.execute (node_modules/selenium-webdriver/lib/http.js:489:26)
at processTicksAndRejections (internal/process/task_queues.js:93:5)
[mochawesome] {
"killed": false,
"code": 3,
"signal": null,
"cmd": "xdg-open /root/test/mochawesome-report/mochawesome.html"
}
npm ERR! Test failed. See above for more details.
Если я правильно понимаю это, решением этой ошибки было запустить ее без головы?