python-shell
python-shell copied to clipboard
Trying to execute a python+selenium web automation from Protractor script
I have written script in python+selenium. I wanted to access above script (web page automation) from protractor JS. I kept the script in beforeAll() for testing purpose only.
Question: Though browser get triggered but it's not playing python code(cwb_adduser.py).
describe('General Settings Page -> ', () => { beforeAll(() => { var pyshell = new PythonShell.run('cwb_adduser.py', { scriptPath: 'C:/Python34_1/node_modules/gulp-protractor/node_modules/protractor/selenium/' });
pyshell.on('message', function (message) {
// received a message sent from the Python script (a simple "print" statement)
console.log(message);
});
});
it('Test the data present in organisation info tab', () => {
});
});
});