I receive a series of product names from an API, which I input into the "Main Search Bar" repeatedly.
While emulating the behavior of a first-time visitor to the page, I encounter a pop-up overlay which renders all elements unresponsive, with the exception of itself.
cy.get('.popup').invoke('attr', 'data-dr-hide', 'true')
.should('have.attr', 'data-dr-hide', 'true');
// the `true` may or may not need to be in quotes
If you can identify the cookie or local storage or session storage value that determines if you are a first-time visitor, it can also be beneficial to just load the page with that value set to whatever says you are not a first-time visitor.
2
Answers
This fixed my problem:
You can also modify the element to not appear, assuming that the
data-dr-hide
attribute is what determines if the overlay appears.If you can identify the cookie or local storage or session storage value that determines if you are a first-time visitor, it can also be beneficial to just load the page with that value set to whatever says you are not a first-time visitor.