I'm trying to run some phantomJS by sending it in via Standard Input, but my webpage open does not respond.
Here is the javascript I'm trying to execute:
require('webpage').create().open('http://google.com', function() { console.log('done'); phantom.exit(); });
Pretty straight forward, right?
Put that in a file.js, and use
phantomjs.exe file.js
and it works, but execute it via REPL
phantomjs.exe
phantomjs> require('webpage').create().open('http://google.com', function() { console.log('done'); phantom.exit(); });
and it never hits the callback. Listening to onResourceRequested shows it is being requested the same, but onResourceReceived never comes back.
This is running on windows 7. Is there anything special I need to do for page.open to work for REPL?
Edit: I should have mentioned, I'm running this from C# in an environment where executing from a file isn't really feasible