Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

262
Vistas
Nightmare hangs on goto()

I have been recently working with NightmareJS and I am now having a problem. It seems as though whenever I try to load a page using Nightmare and wait for a selector to exist, it hangs on the goto call. I have the following code and the only thing printed to console is "loading".

nm = new Nightmare({show: false});

console.log("loading");

nm.goto("https://www.google.com")

.then(() => {
  return nm.wait(".gbqfba")
  .then(() => {
    console.log("search bar loaded, showing browser");
    nm.show();
  })
  .catch((err) => {
    console.log(err.toString());
  })
})
.catch(error => console.log('An error occurred:', error));

(the class 'gbqfba' is a hidden part of the search bar that I wait for so I know the bar is loaded)

over 4 years ago · Santiago Trujillo
1 Respuestas
Responde la pregunta

0

nightmare.show() is no more a function and you need to set it during initialize.To view nightmare's renderer window, you need to pass

var nightmare = Nightmare({ show: true });

Also, you can turn on the Developer tools, so that you can manually check if document.querySelector(".gbqfba"); is working.

var nightmare = Nightmare({
   openDevTools: true,
   show: true
});
over 4 years ago · Santiago Trujillo Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda