Protractor how to run login test script first

我的梦境 提交于 2019-12-03 03:18:11

As highlighted in the Protractor FAQs, you can specify your login code in the onPrepare section of your conf file. Here is an example.

You can also achieve this in beforeAll but that adds unnecessary overhead to your test scripts. Altering the localStorage is possible, but not in the spirit of e2e testing since a lot can go wrong wrt LS, and you will end up wondering if it is your app or your LS modification code that caused this.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!