0

当我使用 webdriver-manager 运行量角器测试时,测试在 Firefox 上运行良好。但现在我需要使用 jar 文件设置我自己的 selenium-server-standalone。我使用了相同版本的 jars 和驱动程序,但量角器会抛出这样的错误:

[15:47:21] I/launcher - Running 1 instances of WebDriver
[15:47:21] I/hosted - Using the selenium server at http://localhost:4444/wd/hub
[15:47:25] W/launcher - Ignoring uncaught error WebDriverError: Unable to parse new session response: {"value":{"sessionId":"bc1ff870-3062-4365-8069-57b6e073195a","capabilities":{"moz:profile":"C:\\Users\\IVAN~1.KAT\\AppData\\Local\\Temp\\rust_mozprofile.znm0KIZNJiXE","rotatable":false,"specificationLevel":0,"moz:accessibilityChecks":false,"acceptInsecureCerts":false,"browserVersion":"54.0.1","platformVersion":"10.0","moz:processID":25112,"timeouts":{"implicit":0,"pageLoad":300000,"script":30000},"browserName":"firefox","pageLoadStrategy":"normal","platformName":"windows_nt","webdriver.remote.sessionid":"bc1ff870-3062-4365-8069-57b6e073195a"}}}
[15:47:25] E/launcher - BUG: launcher exited with 1 tasks remaining
npm ERR! code ELIFECYCLE
npm ERR! errno 100
npm ERR! advantage_plus@0.0.1 protractor: `protractor ui-tests/t-dist/configs/protractor-cucumber-conf.js`
npm ERR! Exit status 100
npm ERR!
npm ERR! Failed at the advantage_plus@0.0.1 protractor 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!     C:\Users\ivan.katovich\AppData\Roaming\npm-cache\_logs\2018-02-12T12_47_25_364Z-debug.log
npm ERR! code ELIFECYCLE
npm ERR! errno 100
npm ERR! advantage_plus@0.0.1 ui-cucumber: `npm run tsc-test && npm run protractor`
npm ERR! Exit status 100
npm ERR!
npm ERR! Failed at the advantage_plus@0.0.1 ui-cucumber 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!     C:\Users\ivan.katovich\AppData\Roaming\npm-cache\_logs\2018-02-12T12_47_25_394Z-debug.log

这是 selenium-server-standalone 的 bat 文件:

@ECHO OFF

start cmd /K java -jar selenium-server-standalone-3.9.0.jar -role hub

start cmd /K java -jar selenium-server-standalone-3.9.0.jar -role node -hub http://localhost:4444/grid/register -browser "browserName=chrome,maxInstances=10"

start cmd /K java -jar selenium-server-standalone-3.9.0.jar -role node -hub http://localhost:4444/grid/register -browser "browserName=firefox,maxInstances=10" -port 5556

start cmd /K java -jar selenium-server-standalone-3.9.0.jar -role node -hub http://localhost:4444/grid/register -browser "browserName=internet explorer,version=11,platform=WINDOWS,maxInstances=10" -port 5557



exit

它是火狐的功能:

  capabilities: {
    browserName : 'firefox',
    marionette: true,
  },

直接连接设置为假。

有谁知道问题是什么以及如何解决?

4

1 回答 1

0

protractor全局安装:

npm install -g protractor
webdriver-manager update
webdriver-manager start

无法从本地安装的模块启动

于 2018-06-27T12:34:23.100 回答