python-shell icon indicating copy to clipboard operation
python-shell copied to clipboard

Trying to execute a python+selenium web automation from Protractor script

Open santisantosh opened this issue 8 years ago • 0 comments

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', () => {


    });

});

});

santisantosh avatar May 04 '17 13:05 santisantosh