php-casperjs icon indicating copy to clipboard operation
php-casperjs copied to clipboard

working with cookies

Open foxpcteam opened this issue 7 years ago • 4 comments

Hi, in js we could make this work like:

var fs = require('fs');
var cookies = JSON.stringify(phantom.cookies);
fs.write(cookieFilename, cookies, 644);

The phantom is global variable in PhantomJS. More information you can get in wiki

if it possible to work with cookies in php-casperjs?

foxpcteam avatar Nov 05 '16 13:11 foxpcteam

?

foxpcteam avatar Nov 11 '16 16:11 foxpcteam

Hello, you will need to be able to import dependencies in your script, we just need to be able to add some code before casper script in the generated js. The problem I see is that you will need a /node_modules somewhere or to install your node modules globally before being able to require them.

alwex avatar Nov 13 '16 23:11 alwex

Hi @alwex , any example how to do that will be helpfull.

Thanks

foxpcteam avatar Nov 14 '16 04:11 foxpcteam

@foxpcteam @alwex any news here?

natterstefan avatar May 03 '17 14:05 natterstefan