带有量角器的Selenium GeckoDriver:"失败:超时"

时间:2018-01-17 18:01:10

标签: selenium protractor timeout geckodriver

我的自动化测试套件使用Selenium WebDriver和Protractor以及Jasmine来运行各种浏览器。当使用GeckoDriver在Firefox上运行测试时,我间歇性地收到一条错误消息,上面写着"失败:超时":

.    ✓ WHEN I visit the favorites page
.    ✓ THEN it should say I havent added anything
F    ✗ WHEN I open the inspirations page
      - Failed: Timed out
      Build info: version: '3.8.1', revision: '6e95a6684b', time: '2017-12-01T19:05:32.194Z'
      System info: host: 'admins-MacBook-Pro-3.local', ip: 'fe80:0:0:0:10a7:9b8d:6ff5:f46%en0', os.name: 'Mac OS X', os.arch: 'x86_64', os.version: '10.12.6', java.version: '1.8.0_144'
      Driver info: driver.version: unknown
F    ✗ AND I click on an inspiration preview pane to open an inspiration

我已经尝试用任何一方的硬编码睡眠填充它,我已经搜索了其他错误,但我发现的关于量角器超时的其他所有内容都是针对其他有某种描述的错误关于什么是实际超时。

有没有人见过这个消息"失败:超时"在这里谁可以帮助确定什么可能超时?

根据要求,这是开始我的量角器的gulp任务:

gulp.task('test-frontend-firefox', 'Run feature tests locally', function() {
  gulp.src(['test/feature/**/*.spec.js'])
    .pipe(protractor({
      configFile: __dirname + '/../test/protractor_local_ff.conf.js',
      args: ['--baseUrl', 'http://localhost:9099'],
    }));
});

以下是gulp任务引用的protractor_local_ff.conf.js:

var private_config = require('./private.conf.js');
var golden_config = require('./golden.conf.js');
exports.config = {
  params: {
    private: private_config,
    golden: golden_config,
    localhost: true
  },
  onPrepare: function(){
    var SpecReporter = require('jasmine-spec-reporter').SpecReporter;
    jasmine.getEnv().addReporter(new SpecReporter({displayStacktrace: 'all'}));
  },
  framework: 'jasmine2',
  // seleniumAddress: 'http://hub-cloud.browserstack.com/wd/hub',
  seleniumAddress: 'http://localhost:4444/wd/hub',
  capabilities: {
    'browserName': 'firefox'
  }
};

正如您所看到的,它设置为能够在browserstack或我的localhost中针对托管应用运行,但错误会在任一环境中间歇性地抛出。

0 个答案:

没有答案