These are chat archives for rosshinkley/nightmare

24th
Jun 2016
Mingsterism
@mingsterism
Jun 24 2016 02:39
@rosshinkley ross been trying many different ways to get this to work, but still receive error TypeError: Cannot read property 'evaluate' of undefined
im not too sure if implementing promises correctly.
function start(url) {
    var Nightmare = require('nightmare');
    var nightmare = Nightmare({show:true})
    return nightmare
        .goto(url)
        .evaluate(functionX)
        .then(function(values) {
            console.log(values);
        })
}
var abc = start('www.facebook.com');
Promise.resolve(abc).then(function() {
    return nightmare
        .evaluate(function() {
            // do something
        })
})
other ways ive tried
abc.then(function() {
   return nightmare
      .evaluate()
})
appreciate help. thanks
btw, just a side track, what are your thoughts on reactive programming vs promises. been looking at articles like these https://glebbahmutov.com/blog/counting-promises-vs-rx/
Ross Hinkley
@rosshinkley
Jun 24 2016 03:51
hm
looking at your first example... maybe i'm tired, but it looks like nightmare is defined in the function scope
so in your .then() toward the bottom, nightmare won't be defined
Ross Hinkley
@rosshinkley
Jun 24 2016 04:02
re rxjs vs promises, i like the idea of state and event handling being unidirectional
which in my limited understanding, is kind of the point
that being said, the article you linked to is flawed, you don't have to write out each .then() to accomplish sequential execution
map/reduce works just fine to accomplish that same goal
Alex Bednarczyk
@alexbednarczyk
Jun 24 2016 11:44
i'm curious what tools others are using for visually confirming CSS on different browsers? I was thinking of using nighmarejs along with node huxley, but huxley seems to be lacking community support so I'm looking for alternatives
Samuel Rounce
@srounce
Jun 24 2016 11:47
Hi all
Having trouble
just getting started and ran one of the examples, the .catch() method does it’s job but the error is just an empty object?
Samuel Rounce
@srounce
Jun 24 2016 11:56
none of the examples seem to be working for me
am I missing some external dependency?
Alex Bednarczyk
@alexbednarczyk
Jun 24 2016 11:57
the yahoo search example didn't work for you?
the mocha one didn't work from me when i copied from github, but the first example did work for me
npm install nightmare, copy paste example straight from github to test.js, then node test.js
Samuel Rounce
@srounce
Jun 24 2016 12:00
initally didn’t work
re-installed deps and switched to node 6.2.2 from 6.2.1 and now working
though I don’t think that shoud’ve made much difference
maybe bad cached module
Alex Bednarczyk
@alexbednarczyk
Jun 24 2016 12:02
great it works
Alex Bednarczyk
@alexbednarczyk
Jun 24 2016 12:09
how do I get "test reporting" to display? like "1/2 Tests passed"
Samuel Rounce
@srounce
Jun 24 2016 12:09
knew I’d love this library as soon as I saw the API
works great
now I have a list of every driving test centre in the UK and it’s corresponding waiting time :)
which HM Govt fails to provide in anything approaching a sensible way
Alex Bednarczyk
@alexbednarczyk
Jun 24 2016 12:45
nice
Ross Hinkley
@rosshinkley
Jun 24 2016 15:01

i'm curious what tools others are using for visually confirming CSS on different browsers? I was thinking of using nighmarejs along with node huxley, but huxley seems to be lacking community support so I'm looking for alternatives

visually confirming? how do you mean? Huxley aims for pixel-perfect rendering, i think

how do I get "test reporting" to display? like "1/2 Tests passed"

What testing framework are you using?

Alex Bednarczyk
@alexbednarczyk
Jun 24 2016 20:04
@rosshinkley i'm using nightwatchjs
can it be used with nightmare?
Ross Hinkley
@rosshinkley
Jun 24 2016 20:30
good question, i'm not sure
i don't know why you would necessarily want to mix the two
doesn't nightwatch use selenium/webdriver?