量角器测试失败时如何截屏? [英] How to take a screenshot when a protractor test fails?
问题描述
我是 Protractor 的新手,并试图弄清楚当我的测试失败时如何截取屏幕截图..我已经尝试使用 protractor-jasmine2-screenshot-reporter 但它似乎不起作用..有人使用不同的插件吗?或者知道为什么上面的没有?
I'm new to Protractor and trying to figure out how can I take screenshot when my tests are failing.. I've already tried to use protractor-jasmine2-screenshot-reporter but it does not seem to work.. Anyone uses a different plugin that works? or have any idea why the above one doesn't?
谢谢.
推荐答案
最终我找到了一些对我有帮助的 gitHub 存储库.如果有人在解决问题时遇到问题,您可以使用:
Eventually I've found some gitHub repo that helped me. If anyone encounters problems resolving the issue, you can use :
https://gist.github.com/jlouros/190d654850f8e2ed7b51a306
https://gist.github.com/jlouros/190d654850f8e2ed7b51ed6267f30400
非常适合我.
这篇关于量角器测试失败时如何截屏?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!