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

411
Vistas
When it is better to use page.type() or page$eval() to input text with Puppeteer?

I am using Puppeteer to insert some text (an email address) into an input field on a web page. By reading online docs and blogs, I found two ways to do it. To input the value "directly" by using:

page.$eval('input[type="email"]', element => element.setAttribute("value", "me@mydomain.com"))

or to input the text as a user would do, by using:

page.keyboard.type("me@mydomain.com")

What are the pros/cons of the two commands? When shall I prefer one over the other?

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