【发布时间】:2014-05-06 18:34:02
【问题描述】:
我正在尝试在 Windows 机器上运行它并不断收到超时。我正在运行 Selenium,但它似乎无法完成与 URL 的连接。
var client = require('webdriverjs').remote({
desiredCapabilities: {
browserName: 'chrome'
},
logLevel: 'verbose'
});
var expect = require('chai').expect;
describe('Test example.com', function(){
before(function(done) {
client.init().url('http://example.com', done);
});
describe('Check homepage', function(){
it('should see the correct title', function(done) {
client.getTitle(function(err, title){
expect(title).to.have.string('Example Domain');
done();
});
});
});
after(function(done) {
client.end();
done();
});
});
这是我收到的错误:
1) Test example.com "before all" hook:
Error: timeout of 10000ms exceeded
at null.<anonymous> (C:\Users\sandy_000\AppData\Roaming\npm\node_modules\m
ocha\lib\runnable.js:139:19)
at Timer.listOnTimeout [as ontimeout] (timers.js:110:15)
【问题讨论】:
-
您是否尝试将超时时间增加到例如
999999999。你的测试工作正常,我已经测试过了。
标签: windows webdriver mocha.js selenium-chromedriver webdriver-io