Reputation: 884
I have used node to execute a shell script to open google chrome from terminal
The script is as follows
var sys = require('util');
var exec = require('child_process').exec;
function puts(error, stdout, stderr) {
sys.puts(stdout)
}
exec("google-chrome-stable 172.16.16.16/logout", puts);
My intention is to automatically submit the form that is loaded in the page, for which I need to use document.getElementById(). However node returns an error saying document is not defined. How do I proceed?
Upvotes: 0
Views: 57