testing - CodeceptJS 完成后关闭浏览器窗口

标签 testing automated-tests puppeteer codeceptjs

我是使用 PuppeteerCodeceptJS 新手。我想让我的窗口浏览器在完成后打开。

Feature('Login');

Scenario('test', (I) => {
    I.amOnPage('https://google.es')

});

最佳答案

只需将 pause() 作为测试用例的最后一行

Feature('Login');

Scenario('test', (I) => {
    I.amOnPage('https://google.es')
    pause(); 

});

关于testing - CodeceptJS 完成后关闭浏览器窗口,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/58881028/

相关文章:

python - 无法让 Nose 遵守我在测试中设置的属性

groovy - Geb 和 Spock 测试框架有什么区别

javascript - 如何使用 Puppeteer 抓取 Reddit 页面?

javascript - Puppeteer - 如何在没有导航的情况下点击链接

unit-testing - 如何使用 ctest 重新运行失败的测试?

maven-2 - 在 Maven 中共享测试代码

java - 运行 selenium IDE 导出测试用例

node.js - 使用 Node.js 中的 async/await 函数限制从 CSV 文件读取的行数

ruby-on-rails - Rails rake 测试返回错误消息

unit-testing - 分层依赖注入(inject)要测试什么