I am getting to a point that i can cy.log() the text that is inside that element but i can't find a simple solution where i can get that text, store it and manipulate it for later tests.
it('login to my eshop that uses virtual currency' , function() {
cy.visit('my favorite shopping site')
cy.get('#username').type('user')
cy.get('#password').type('pass')
cy.get('balance element').then(function(text1){
cy.log(text1.text())
///I see the text but that's pretty much it.
})
})
I do not need an assertion for this particular case. I am trying to get a current balance, do some purchase testing and compare initial balance with remaining balance.
Any suggestions would be greatly appreciated , spent couple of days searching, trying and editing but i am stuck do the async nature of cypress.