Protractor starts Firefox but doesn't run any tests

前提是你 提交于 2019-12-10 11:31:47

问题


If I run protractor agains Firefox, Firefox is started and a blank tab is shown. Which is all I get (no specs are executed). After a while I get the following error:

WebDriverError: Unable to connect to host 127.0.0.1 on port 7055 after 45000 ms. Firefox console output:
"}],"targetPlatforms":[],"seen":true}
...

Now, I've also written a script which uses selenium webdriver directly, which works like a charm with FF. So, the problem must be protractor specific I would say!

So, here is my protractor config file:

require('babel-core/register'); // Spec files are in ES2015

exports.config = {
    framework: 'jasmine2',
    capabilities: {
        browserName: 'firefox'
    },
    specs: ['some.spec.js']
};

It doesn't matter if I start webdriver-manager and geckodriver I always end up with a blank tab. Any suggestions what I might be doing wrong here?

Some more details:

"babel-cli": "^6.18.0",
"babel-preset-es2015": "^6.18.0",
"babel-preset-stage-0": "^6.16.0",
"protractor": "^5.0.0",
"selenium-webdriver": "^3.0.1"

FF 50 Mac, macOS Sierra 10.12.2


回答1:


We recommend using Firefox 47. If you are on Protractor 5.0.0, you will need an additional capability to disable marionette. Disabling marionette will let you use the Firefox legacy driver:

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

Geckodriver is currently downloaded but is not being used by Protractor due to FF 48+ errors / selenium standalone server errors. Check out the Protractor CHANGELOG. We will update this with recommended FF versions when it becomes more stable.



来源:https://stackoverflow.com/questions/41615695/protractor-starts-firefox-but-doesnt-run-any-tests

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!