Can Cypress simulate a user browsering with "ad-blocker" enabled? #29002
Unanswered
darrinmn9
asked this question in
Questions and Help
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Ad-blockers are so prevalent today, with some browsers even having them built in. This can add complications, especially with websites that surface cookie consent forms (as some legal jurisdictions require explicit consent to continue). Is there a way in cypress to "simulate an ad-blocker", or do something like, "Block any and all assets from the domain
abc.com
"?I realize this can sorta be done for http requests via
cy.intercept
, but I am hoping for a way to be able to simulate the blocking of all assets, including scripts/css/images/ajax/etc, and to be able to run tests that a assert the website is still functional in this situation.Beta Was this translation helpful? Give feedback.
All reactions