无法使用自己部署的selenium-server-standalone在firefox上运行量角器测试

时间:2018-02-12 13:24:58

标签: javascript protractor geckodriver selenium-server

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

[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

这是firefox的能力:

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

directConnect设置为false。

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

1 个答案:

答案 0 :(得分:0)

全局安装protractor

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

它不能从本地安装的模块开始