私はMocha、Chai、およびSelenium webdriverを使って簡単なテストを書いています。しかし、その私を投げ:モカとチャイ - エラー:25000msのタイムアウトを超えました。このテストでdone()コールバックが呼び出されていることを確認してください
'use strict';
var webdriver = require ('selenium-webdriver'),
chai = require ('chai'),
until = webdriver.until,
By = webdriver.By,
wait = webdriver.wait,
chaiAsPromised = require("chai-as-promised"),
assert = chai.assert,
mocha = require('mocha'),
expect = chai.expect;
chai.config.includeStack = true;
var driver;
describe('Login', function(){
before(function(done){
driver = new webdriver
.Builder()
.withCapabilities(webdriver.Capabilities.chrome())
.build();
driver.get('http://someurl');
driver.findElement(By.id('username')).sendKeys('username');
driver.findElement(By.id('password')).sendKeys('password');
driver.findElement(By.id('Login')).click();
this.timeout(25000);
setTimeout(done, 25000);
});
after(function(done){
driver.quit();
this.timeout(5000);
done();
});
it('verify the waiting for task Button', function(){
driver.wait(until.elementLocated(By.css('.StartButton__btn')))
.then(function(){
driver.findElement(By.css('.StartButton__btn')).click();
});
var waitScreenTest =
driver.findElement(By.css('.WaitingScreen__text')).getText();
assert(waitScreenTest, 'Waiting for Tasks');
});
});
を、私はこの問題を解決するにはどうすればよい:
Error: timeout of 25000ms exceeded. Ensure the done() callback is being called in this test.
ここで私が使用しているコードはありますか?
ありがとうございました。しかし、それは私にも 'テスト'を使用した後も同じエラーを与えます。 –