TypeScript + Cucumber Issue : Error: function timed out after 10000 milliseconds
TypeScript + Cucumber Issue : Error: function timed out after 10000 milliseconds
我正在 运行 使用 TypeScript 进行黄瓜硒测试并面临以下错误:
whilst trying to wait: Error: function timed out after 10000
milliseconds
请在下面找到我的源代码:
Then(/^I see the application Homepage$/, async () => {
await browser.sleep(10000);
expect(browser.getTitle()).to.eventually.equal('Application - Module Page');
});
我已经解决了这个问题,在 conf.js 中更改设置没有被选中,但是下面 defineSupportCode 中的代码有效:
defineSupportCode(function ({ registerHandler, registerListener, After, setDefaultTimeout }) {
setDefaultTimeout(20 * 1000);
let jsonReports = process.cwd() + "/reports/json";
let htmlReports = process.cwd() + "/reports/html";
let targetJson = jsonReports + "/cucumber_report.json";
我正在 运行 使用 TypeScript 进行黄瓜硒测试并面临以下错误:
whilst trying to wait: Error: function timed out after 10000 milliseconds
请在下面找到我的源代码:
Then(/^I see the application Homepage$/, async () => {
await browser.sleep(10000);
expect(browser.getTitle()).to.eventually.equal('Application - Module Page');
});
我已经解决了这个问题,在 conf.js 中更改设置没有被选中,但是下面 defineSupportCode 中的代码有效:
defineSupportCode(function ({ registerHandler, registerListener, After, setDefaultTimeout }) {
setDefaultTimeout(20 * 1000);
let jsonReports = process.cwd() + "/reports/json";
let htmlReports = process.cwd() + "/reports/html";
let targetJson = jsonReports + "/cucumber_report.json";