Reputation: 71
I have Three text-boxes. Input 10 in first text-box and you will get 9.5 and 10.5 in next 2 text-boxes. Need to verify the values of auto calculated text-boxes.
This is what i Have tried
cy.get('#LSL').should('have.text', '9.5');
cy.get('#LSL').should('contains', '9.5');
text that it finds is blank
Upvotes: 1
Views: 315
Reputation: 18634
When the value attribute is not present for any input field, the next is to look for for innerHTML or innerText. Mind giving this a try:
cy.get('#LSL').invoke('text').should('contain', 9.5);
Upvotes: 1