[英]TypeScript + Cucumber Issue : Error: function timed out after 10000 milliseconds
我正在使用TypeScript運行黃瓜硒測試,並且遇到以下錯誤:
嘗試等待時:錯誤:函數在10000毫秒后超時
請在下面找到我的源代碼:
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";
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.