I am using protractor to test angularJS apps. I have declared a variable 'logDir' in my test js and want to use it as global variable in other js.
//test.js
var regex = /(.*automation)/;
var result = regex.exec(__dirname);
var baseDir = result[0];
var libDir = baseDir + '/lib';
I want to use libDir variable globally in other js.
I am new to protractor and need help. If more clarification needed, let me know.
Thanks in advance.