How do I override protractor's click method in

2019-06-10 11:47发布

问题:

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.

回答1:

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?



标签: protractor