These are chat archives for rosshinkley/nightmare

Jul 2017
Mario David
Jul 14 2017 06:38

hi, i have a little question. I want to use wait() not until some element is visible, but until some element is not visible any more (there is some loading indicator in there...). I tried using something like this, but it did not to work out very well:

    .wait(function() {
      if ($('')[0] === undefined) {
        return true
      } else {
        return false

Also wait(fn) is not documented (i think i read it somewhere).

Is there a way to wait until a certain element on the page disappeared?

Ross Hinkley
Jul 14 2017 12:17
I'll be around later today
Davide De Gennaro
Jul 14 2017 12:49
@py4object according to the tests exists should return immediately a bool:
Davide De Gennaro
Jul 14 2017 12:54
@mariomddavid_twitter try to use something like
.wait(() => $('').length === 0)
Hugo Grochau
Jul 14 2017 15:37
Nightmare looks awesome! Does anyone know if it's still maintained? The github repo hasn't been updated in 5 months and there are a lot of issues and PRs