gpt4 book ai didi

javascript - TypeScript + Cucumber 问题 : Error: function timed out after 10000 milliseconds

转载 作者:行者123 更新时间:2023-11-28 04:10:13 25 4
gpt4 key购买 nike

我正在使用 TypeScript 运行 cucumber Selenium 测试并面临以下错误:

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";

关于javascript - TypeScript + Cucumber 问题 : Error: function timed out after 10000 milliseconds,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/46361839/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com