Reputation: 1439
I'm working with protractor (in combination with Jasmine) and I would like to test application which requires login. I tried to search here and I have found one solution which suggested to put login code into beforeEach method on test suite. Isn't there any other way? I will test lets say 20 pages, so I need to login only once, at the beginning of the testing. Not before each test suite.
Upvotes: 2
Views: 306
Reputation: 3731
You can put your login in an onPrepare
function, in your config file, that will get run once before any of your test runs. See the example withLoginConf.js
Upvotes: 2