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

236
Vistas
How can I set vue.js input element via JS

I have a input made by vue.js's built-in components. I want to be able to set a value and submit this value to be able to create automated tests. How can I accomplish this?

Currently this is how I set value, but on submit this value is changed with the default data automatically.

    Execute JavaScript    return element.value = "${startDate}"
almost 4 years ago · Santiago Trujillo
2 Respuestas
Responde la pregunta

0

Simply run dispatchEvent method on the component itself. This will let Vue to set the value that you've entered to the form data

Execute JavaScript    return element.dispatchEvent(new Event('input'));
almost 4 years ago · Santiago Trujillo Denunciar

0

Creating a new dispatchHandler fixed my problem!

Execute JavaScript    return element.value = "${startDate}"
Execute JavaScript    return element.dispatchEvent(new Event('input'));
almost 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