This is my first time working in javascript and cypress, so I am a bit unfamiliar with the syntax, I don't know how to extract the price and write it in a document or in the command log
cy.get('.product-page-pricing > :nth-child(1) > .d-inline-flex > .pricing-block > .product-new-price').then(price).writeFile('C:\path\price_cheking_on_emag_tablet\cypress\e2e\price_history.txt',price)