Selenium 带量角器的硒壁虎河;失败:超时“;

Selenium 带量角器的硒壁虎河;失败:超时“;,selenium,protractor,timeout,geckodriver,Selenium,Protractor,Timeout,Geckodriver,我的自动化测试套件使用带量角器的SeleniumWebDriver和Jasmine在各种浏览器上运行。当使用GeckoDriver在Firefox上运行测试时,我会间歇性地收到一条错误消息,上面写着“失败:超时”: 我试着在两边用硬编码的睡眠填充它,我也搜索了其他错误,但我能找到的关于量角器超时的所有其他错误都是关于其他错误的,这些错误有一些关于实际超时的描述 有没有人在这里看到消息“Failed:Timed out”(失败:超时),谁可以帮助确定什么可能超时 根据要求,以下是启动量角器的吞咽任

我的自动化测试套件使用带量角器的SeleniumWebDriver和Jasmine在各种浏览器上运行。当使用GeckoDriver在Firefox上运行测试时,我会间歇性地收到一条错误消息,上面写着“失败:超时”:

我试着在两边用硬编码的睡眠填充它,我也搜索了其他错误,但我能找到的关于量角器超时的所有其他错误都是关于其他错误的,这些错误有一些关于实际超时的描述

有没有人在这里看到消息“Failed:Timed out”(失败:超时),谁可以帮助确定什么可能超时

根据要求,以下是启动量角器的吞咽任务:

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'],
    }));
});
这里是gradutor_local_ff.conf.js,由gulp任务引用:

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或my localhost中针对托管应用程序运行,但在任何一种环境中都会间歇性抛出错误。

能否显示用于配置驱动程序和初始化Web浏览器的代码块?@DebanjanB-谢谢。我编辑了问题以包含这些信息。您是否在某个地方设置了
jasminenodepts.defaultTimeoutInterval
?错误已停止抛出,因为我已将代码分解为更小的“it”块,这些块定义了Jasmine中的每个测试。这很可能是我的测试运行者Jasmine抛出的错误。@Barney我有Jasmine.DEFAULT\u TIMEOUT\u INTERVAL=100000;在我的Jasmine beforeAll块中,但我认为如果超时,它会抛出一个不同的、更具描述性的错误。。。。我不再得到简单的“失败:超时”错误,但我仍然很好奇是什么导致了它。
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'
  }
};