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.
Nope. But Protractor's config does allow you to use beforeLaunch
, onPrepare
, and onComplete
blocks. Those should get you where you want to be.