-
npm install
-
To test that phantomjs works as expected:
./node_modules/.bin/phantomjs phantom-script.js USERNAME PASSWD
-
Then run it from nodejs:
node phantom.js
(the username and password are hardcoded in this file for now...)
The phantom.js
script just proves that it works, by checking the "username" in the top right corner of the Premier homepage.
Note that it still takes about 6 seconds for phantomjs to login into QA.
axios
package is used as a nodejs HTTP client... But request
or any other nodjs http client can be used (that allows to send custom headers).
I followed the steps but didn't work for me.