called script name is now removed from phantom.casperArgs.args array
Showing
1 changed file
with
4 additions
and
0 deletions
... | @@ -100,6 +100,10 @@ | ... | @@ -100,6 +100,10 @@ |
100 | phantom.exit(1); | 100 | phantom.exit(1); |
101 | } | 101 | } |
102 | 102 | ||
103 | // filter out the called script name from casper args | ||
104 | phantom.casperArgs.args = phantom.casperArgs.args.filter(function(arg) { | ||
105 | return arg !== phantom.casperScript; | ||
106 | }); | ||
103 | phantom.injectJs(phantom.casperScript); | 107 | phantom.injectJs(phantom.casperScript); |
104 | } | 108 | } |
105 | })(phantom); | 109 | })(phantom); | ... | ... |
-
Please register or sign in to post a comment