I'm trying to write tests for my chrome/firefox extension using Cypress.io
In my extension content-script, I append a button to the body element of the DOM and try to use cypress to click that button, however when running the test, the button is injected into the test runner DOM, instead of the DOM of the page that my test visits via cy.visit() - so my cy.get('injected element') call can't find the element.
It looks like cypress loads the cy.visit() page in an iframe and cy.get() can't find elements outside of that iframe.
How can I get around this?