I am running a Protractor test that will verify various elements on a website, but before doing this I want to run an external JavaScript script with arguments using node which will set up some prerequisites beforehand. However, I am completely stuck as to how I would run the "javascript_code.js" script from the protractor.
I know the protractor code below is completely wrong, I have just used the describe/it layout to show where I want to do what and where:
describe('Validate elements on website',function(){
// reference and run the javascript_code.js
require('C:\<file path>\Javascript_code.js');
Run "node javascript_code.js arg1 arg2 arg3"
it('Validate onscreen elements', function(){
<Do website verification>
});
});