Closed mr-mig closed 11 years ago
This works fine for me with PhantomJS 1.8.1. Could be related to API changes in v 1.9?
Have you checked for security violation errors? Seems that PhantomJS might be more strict regarding cross domain requests in later versions. See : http://stackoverflow.com/questions/15847123/on-phantomjs-cant-include-jquery-and-without-jquery-cant-post-form-data
How can I check the errors in phantomjs using the wrapper?
The problem is that when I use the same code running phantomjs testfile.js
it evaluates and loads jQuery.
Actually, I've tried this wrapper api with "local" scripts (I deliver them from localhost, so the url is smth like http://localhost:3000/statis/somescript.js
) with no success either.
Local urls will probably not help with cross domain security issues.
If you follow the stackoverflow path one guy mentions that you should listen for onConsoleMessage. You should be able to listen for that callback with the wrapper.
Thanks for pointing out the page.onConsoleMessage
and page.onError
callbacks. I think it would be great if you add them explicitly in Readme.md.
Today the stars are in the right position and page.includeJs
works fine. I don't know what I was doing wrong, but is is not an issue, so I close it.
I use the provided code snippet to debug the includeJs output. It works when launched by phantomjs itself, but it does not work when used via node-phantom.
It seems that in
bridge.js
therespond
is not called inpageIncludeJs
case. Maybe therespond
funciton is not seen in the controlpage context?Nodejs: 0.10.4 node-phantom: 0.2.3 phantomjs: 1.9.0