ошибки после запуска npm с мокко и селеновым webdriver - PullRequest
0 голосов
/ 26 сентября 2019

Запуск селенового веб-драйвера с узлом и мокко в Ubuntu 18.04 ...

Теперь я получил эти ошибки:

  1) Google search automated testing
       find the input box and google search button:
     TimeoutError: Looking for element
Wait timed out after 15002ms
      at /root/test/node_modules/selenium-webdriver/lib/webdriver.js:834:17
      at runMicrotasks (<anonymous>)
      at processTicksAndRejections (internal/process/task_queues.js:93:5)

  2) Google search automated testing
       put keyword in search box and click search button:
     TimeoutError: Looking for element
Wait timed out after 15005ms
      at /root/test/node_modules/selenium-webdriver/lib/webdriver.js:834:17
      at runMicrotasks (<anonymous>)
      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"
}

Какие детали вам нужно датьбольше отзывов?Есть ли шанс отладить это?

Это моя база для игры с банкоматом.(https://github.com/bmshamsnahid/Automation-With-Selenium-And-Node.js)

1 Ответ

0 голосов
/ 27 сентября 2019

Если я удаляю опцию безголовых, я получаю это:

> 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.

Если я правильно понимаю это, решением этой ошибки было запустить ее без головы?

...