great-answer-57072
09/30/2022, 7:49 AMdataLayer
object using Cypress. For now, I can use cy.window.its('dataLayer')
to get the data, but in my test cases, there are a lot of button clicks with routing to other pages. The dataLayer object will be refreshed.
Therefore, my question: is there any way to get the data after button clicks but before routing to the designated page?