测试咖啡馆:提交后页面超时

时间:2019-09-16 18:15:36

标签: automation automated-tests timeout e2e-testing testcafe

单击“过滤器”按钮组合报告后,Test Cafe出现一些问题。这是我的代码:

         ...
         await report.accessReportBanks(testData.page + '/reports/report_banks');

         const filterButton = Selector('input').withAttribute('type', 'submit').withAttribute('value', 'Filter');

         await t
             .click(filterButton);
             .wait(120000)
             .expect(Selector('tbody').child('tr').count).gt(0, "Expects results for Report Banks");
     });

click操作正常,但超时似乎早于预期,并且浏览器最终进入空白屏幕,没有错误消息,但URL:

http://192.168.50.249:55753/eUn3KSCLI/about:error

这是怎么回事?我该如何解决?

已经在.testcaferc.json上设置了此值

{
     "assertionTimeout": 60000,  // Defines the maximum time TestCafe will wait the elements to be "ready" before performing an assertion
     "pageLoadTimeout": 60000,   // Defines the maximum time TestCafe will wait the page be "ready" before performing an assertion
     "quarantineMode": true,     // The quarantine mode is designed to isolate non-deterministic tests from the other tests
     "selectorTimeout": 60000    // Defines the maximum time TestCafe will wait for a selector be visible
}

,还尝试用--page-load-timeout 120000进行测试,但仍然没有成功。

1 个答案:

答案 0 :(得分:1)

如果TestCafe需要20秒钟以上才能完成,则它们可以中止浏览器请求。我们已经建议允许配置此超时时间:https://github.com/DevExpress/testcafe/issues/2940。您可以订阅它,以通知有关实施此建议的进度。

或者,您可以在TestCafe source code中修改超时值,并构建自己的TestCafe版本。

相关问题