Closed bbuchalter closed 6 years ago
Can't go further right now, just what phantom's API doc saying.
Quick hack to get it working with PhantomJS 2.#
Add in top of file
var system = require('system');
And replace any occurences of
phantom.args
by
system.args
Finaly, because system.args isn't spliced
var a = 0;
becomes
var a = 1;
After Come2Daddy fix I just get:
"task" argument must be one of: performance, appcache, cssproperties
using
phantomjs confess.js http://google.com performance [Or appcache, or cssproperties]
Yo dawg, I heard you like fix, so I fixed my fix.
I also appears the question, how to solve
@Come2Daddy Can give a solution?
Thank you, ok
Is there a fix to this issue?
Same issue here
TypeError: undefined is not an object (evaluating 'phantom.args.length')
phantomjs://code/confess.js:417
:0 in forEach
phantomjs://code/confess.js:416 in processArgs
phantomjs://code/confess.js:6 in run
Just downloaded the package, had high hopes, let down by TypeError.
I get a similar error: undefined is not an object (evaluating 'phantom.args[0]')
Hi,
Changes in confess.js file
Added line at top var system = require('system');
Replace phantom.args by system.args
run "phantomjs confess.js performance http://www.google.com" It's working for me.
like @Come2Daddy say:
Changes confess.js file
1.Add in top of file
var system = require('system');
2.replace any occurences of
phantom.args to system.args
run phantomjs confess.js "https://www.google.com" performance
It's working for me.
@leimbag the answer fixed the issue.