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

172
Visualizações
Puppeteer click on next(Publicar) blocks everything

After fill the from with puppeter and try to submit, it is like stops working, can anyone help me to know what is happening? here is my code. If you remove the "await page.click('.btnSiguiente');" line, it works and the screenshot is ok, but on submit, something happens.

const puppeteer = require('puppeteer');

(async () => {
  const browser = await puppeteer.launch({
         dumpio: true
    });
  const page = await browser.newPage();


  await page.goto('https://www.pasion.com/textos-del-anuncio/?p=albacete&l=Rivas-Vaciamadrid&c=581&demandax=&x=33&y=17');

  await page.type('#titulo', 'test!'); // Titulo
  await page.select('#elform > div.formColIzq.texto > select:nth-child(9)', 'chica'); // Genero
  await page.select('#elform > div.formColIzq.texto > select:nth-child(10)', 'chico'); // Busco
  await page.type('#edad', '41'); // Edad
  await page.type('#nombre', 'user'); // Nombre
  await page.type('#email', 'test@hotmail.com'); // Email
  await page.type('#repemail', 'test@hotmail.com'); // Repetir Email
  await page.type('#telefono1', '666676151'); // Telefono
  await page.type('#texto', 'Lorep ipsun'); // Anuncio
  await page.select('#horario1', 'a la hora de comer'); // Horario
  await page.select('#duracion', '30'); // Caducidad
  await page.click("#acepto_condiciones_uso_y_politica_de_privacidad",{clickCount:1}); // Terminos y condiciones
  await page.click('.btnSiguiente');
  await delay(1500);
  
  await page.screenshot({ path: 'test.png' });
  await browser.close();
})();

function delay(time) {
   return new Promise(function(resolve) { 
       setTimeout(resolve, time)
   });
}
about 4 years ago · Juan Pablo Isaza
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