These are chat archives for rosshinkley/nightmare

15th
May 2016
Rick Medina
@rickmed
May 15 2016 00:52
guys quick question: I have an app (a meteor app in this case) that runs a nightmare script in the server (in this case heroku which is ubuntu 14 I believe), but the nightmare script is not running, is there anything fundamentally to prevent nightmare to run on servers?
Rick Medina
@rickmed
May 15 2016 01:06
something about display drivers, researching...
Maxwell Zhao
@thepiercingarrow
May 15 2016 01:16
Does nightmare pause node? or will node and electron run simultaneously?
Rick Medina
@rickmed
May 15 2016 01:17
nightmare will spawn electron (node) processes
Maxwell Zhao
@thepiercingarrow
May 15 2016 01:17
Is there any way to stop node until the electron processes finish the queued events?
Rick Medina
@rickmed
May 15 2016 01:17
all the commands are ran async...
pausing it how?
Maxwell Zhao
@thepiercingarrow
May 15 2016 01:19
@rickmed I am running a node loop. I want to run interact with a page, parse the page, then interact with the page again, but each time I interact with the page, I would like node to stop running until the electron queued processes have finished.
Rick Medina
@rickmed
May 15 2016 01:26
This message was deleted
if you create a nightmare instance all the actions (goto, click, etc) are queued and executed in order, you can't do anything with that nightmare instance after it is started and all the actions queued
Maxwell Zhao
@thepiercingarrow
May 15 2016 01:30
@rickmed yes
is there a way to interact while electron is running?
Rick Medina
@rickmed
May 15 2016 01:33
what do you mean? nightmare will launch a electron process (separate node process) with each instance
all the actions scripted to that instance are queued and executed in order, then the electron procress exits and that's it
Maxwell Zhao
@thepiercingarrow
May 15 2016 01:34
When I run a nightmare instance and do .then(), my node continues running even when electron hasn't completed yet
Rick Medina
@rickmed
May 15 2016 01:34
what do you mean by node?
Maxwell Zhao
@thepiercingarrow
May 15 2016 01:37
say, I have:
var n = new Nightmare();
n.wait(5000).goto('example.com').then();
console.log(n.document.querySelector('body').innerText);
Wait... nevermind
I think I know what I did wrong.
Rick Medina
@rickmed
May 15 2016 18:18
well, the whole running electron on a linux server got me into a rabbit hole within nightmare (xvfb, PIDs, window managers...)
Maxwell Zhao
@thepiercingarrow
May 15 2016 22:48
Is there any way to have a function execute whenever a certain DOM element is modified? Like, a listener or something?