如何在量角器 3 及更高版本中覆盖量角器的点击方法? [英] How do I override protractor's click method in protractor 3 and higher?

查看:71
本文介绍了如何在量角器 3 及更高版本中覆盖量角器的点击方法?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我希望覆盖量角器的点击方法,因为我们的应用程序中出现了一些间歇性问题,导致一些零星的测试失败.我们正在寻求覆盖点击,以便我们可以添加一些自定义功能,从而克服此问题,并且尽管存在此问题,我们所有的自动化脚本仍能继续运行.

I am looking to override protractors click method because we are getting some sporadic test failures due to some intermittent problems in our app. We are looking to override the click so we can add some custom functionality so overcome this issue and all our automation scripts to continue to run despite this issue.

推荐答案

测试是为了测试您的应用程序中的所有内容是否正常工作.如果某些原因导致测试不可靠,您应该避免在临时解决方法中进行黑客攻击,而是将测试标记为 pending(xit 而不是 it)并尝试在测试中或在客户端修复问题以使其再次可靠.待处理的测试将列在最终报告中,并会提醒您手动测试或唠叨您正确修复它:)

Tests are to test if everything in your app is working as it should. If something causes tests to be unreliable you should refrain from hacking in a temp workaround and instead mark a test as pending (xit instead of it) and try to fix the issue either in the tests or in the client side to make it reliable again. Pending tests will be listed in the final report and will give you a reminder to test it manually or nag you about fixing it properly :)

如果您提供有关问题性质的更多信息,也许我们可以提出解决问题的想法?

If you provide more information about the nature of the problem maybe we could come up with an idea to solve it?

这篇关于如何在量角器 3 及更高版本中覆盖量角器的点击方法?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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