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

150
Vistas
Select item from website dropdown at random using puppeteer

I want Puppeteer to click a random in-stock size from the dropdown menu on this site:

https://www.shopcapcity.com/product/new-era-exclusive-59fifty-navy-light-blue-anaheim-angels-fitted-grey-uv-very-limited-2/

I can get it to click on the dropdown and bring the in-stock sizes but I can't get it to automate choosing a random item from the dropdown list

This is part of the code I have now

await page.click('#size')
await page.waitForTimeout(200)
await page.waitForSelector('#size')
await page.click('#size', '7 3/8)

What I want Puppeteer to do Is automatically click on a random size from the dropdown that is in stock but how?

about 4 years ago · Santiago Trujillo
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