Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Interactor.js + Cypress
beforeEach(function() {
// Tell Interactor where the applications DOM is
// since Cypress runs the test specs in an isolated iframe (away from the app DOM)
cy.window().then(remoteWindow => {
Object.defineProperty(Interactor.prototype, "$dom", {
get() {
return remoteWindow;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment