0
I need to capture the text of an element with Cypress. I am using:
const test = cy.get('elemento').invoke('text')
cy.log(test)
The log shows: Object{5}
.
What do I have to do to get this log? Because I would like to compare the value of this variable with another value later.
NOTE: I also can’t do the comparison below:
expect(test).to.equal(test)