I have about 20 spec files and most of them use the same functions repeated in each one. Can I put global functions in the conf.js file that each spec file can use? I read this page http://stackoverflow.com/questions/21320400/protractor-angularjs-global-variables
, but it wasn't very helpful and I can't get it working. I tried putting a function in onPrepare
, but the spec files can't find it. I also tried doing global.viewByAds = function () {...};
If anyone can help me I'd really appreciate it!