Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

132
Views
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 answers
Answer question

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 Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!