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

134
Visualizações
get value input text vue using cypress

thank you for reading my question.

I want to ask about how to get value some input text who that value set by virtual dom/data binding in react/vue or maybe another lib/framework.

In my mind, a cypress is a tool for e2e testing. so that's why we can't get this value. I also check the component that I want to get by inspecting that element, and I can't get some attribute for getting my value.

screen shoot of question get value input text vue using cypress

idk but what should i do but i need to get this value. please tell me if you know this answer.

Thank you

about 4 years ago · Juan Pablo Isaza
1 Respostas
Responde à pergunta

0

You can get it by using the invoke('val') method, something like:

cy.get('#input_text_employee_name')
  .invoke('val')
  .then((val) => {
    cy.log(val) //prints hi@there.com
  })

You can also apply an assertion with should('have.value') like this:

cy.get('#input_text_employee_name').should('have.value', 'hi@there.com')
about 4 years ago · Juan Pablo Isaza 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