Search code examples
jasmineprotractorkarma-jasminejasmine-nodekarma-mocha

Can i use BeforeEach and afterEach functions in config file in protractor?


I wonder if can use beforeEach and afterEach functions in config file in protractor in order to avoid repeating common code for all scripts ?

Thanks.


Solution

  • Nope. But Protractor's config does allow you to use beforeLaunch, onPrepare, and onComplete blocks. Those should get you where you want to be.