× {{alert.msg}} Never ask again
Get notified about new tutorials RECEIVE NEW TUTORIALS

You can see what casperJS is doing with this little hack

Maciej Jankowski
Sep 30, 2014
<ol><li>Grab the <a href="https://github.com/maciejjankowski/flaming-octo-puss">repo </a>(and node.js if you don't have it)</li><li>run <code>npm install</code></li><li>run <code>node server.js</code></li><li>go to http://localhost:8002</li><li>use the code below in your phantom or casper script to update the image:</li></ol><pre><code>this.evaluate( function(img){ __utils__.sendAJAX("http://localhost:8002/", 'POST', {'img' : img }, false); }, {'img' : this.captureBase64('png')} ); </code></pre><p>OR you can attach it to <code>onStepComplete</code> handler in your config object.</p><p>Done.</p>
comments powered by Disqus