Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

256
Visualizações
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 Respostas
Responde à pergunta

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 Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda