These are chat archives for rosshinkley/nightmare

May 2016
May 28 2016 04:26
@rosshinkley yes, i need to post a form that not exist on that page but need session context of that page.
May 28 2016 12:04
Hi Ross
/* jshint -W097 */
'use strict';
const Nightmare = require('nightmare');
const realMouse = require('nightmare-real-mouse');
var nightmare = Nightmare({ show: true });

  .select('#ddlTOP', '2013')
  .evaluate(function(){ShowFloorPlanInput('eHNNT3NFS1o3M1ByKzBMRmpNOTJaMnRXWHYwbXNPdHZhcWJMMHVkM2Q3bEFlOUZ1ZHFXL0dLUUJnRTJkOWhOKw==','18','WOODSVILLE CLOSE','14-02');})
  .type('form[action*=""] [name=address]', 'eHNNT3NFS1o3M1ByKzBMRmpNOTJaMnRXWHYwbXNPdHZhcWJMMHVkM2Q3bEFlOUZ1ZHFXL0dLUUJnRTJkOWhOKw==')
  .click('form[action*=""] [type=submit]')
  .then(function (result) {console.log("done");})
  .catch(function (error) {console.error('Err:', error);});
I am able to push my code ahead, now the next issue is how I can try and get the HTML of a modal window which I open by evaluate, please do see the second evaluate function is working well, but I am unable to save the modal window.
Rick Medina
May 28 2016 18:13
@TimmyO18 et al...for the guys trying to run nightmare on heroku (coming late to the party...) don't try it...The problem is with chromium that needs a significant more allocation of dev/shm that heroku sets in their dynos (5mb on ALL of them, which is almost useless), and you can't change that bc heroku doesn't give you root access (was confirmed by support and I even tried a few hacks going the docker route...), so even if you make it work the the apt-get buildpacks, heroku-docker, etc, your scripts will crash within a few executed actions....
normally, linux distros allocate to dev/shm half of the available memory, so on a normal 512mb vm should work, like DO, vultr or whatever (I decided to go with the free AWS tier)
May 28 2016 19:28
@rosshinkley my script worked .