Angular Protractor - 在 E2E 测试后保持浏览器打开 [英] Angular Protractor - Leave browser open after E2E tests

查看:16
本文介绍了Angular Protractor - 在 E2E 测试后保持浏览器打开的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Angular Protractor 测试运行后是否可以让测试浏览器窗口保持打开状态?我有一个在 FireFox 中失败的艰难测试,访问网页的状态以查看发生了什么会很有用.

Is it possible to leave the test browser windows open after Angular Protractor tests run? I have a tough test failing in FireFox and it'd be useful to access the state of the web page to see what's going on.

推荐答案

您可以使用 Protractor debug/pause 功能来暂停 e2e 运行,最终使浏览器保持打开状态:更多信息在这里

You can use Protractor debug/pause feature to pause the e2e run which will ultimately leave the browser open: more info here

为此,请将此行添加到量角器测试中失败的测试之前

To do so, add this line on your protractor test before the failing one

browser.pause();

还有一个非常有用的工具,称为 elementor,您可能想稍后再看看.

There is also a very useful tool called elementor that you may want to take a look later on.

这篇关于Angular Protractor - 在 E2E 测试后保持浏览器打开的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆