Open james2406 opened 3 years ago
frame.ownerDocument is empty in my case and throws an error: cannot read property "defaultView". Is there any other way to inject?
cy.iframe("iframe#XYZ").within((frame) => {
// const window = frame.ownerDocument.defaultView
const window = frame.ownerDocument
cy.injectAxe({ window });
cy.checkA11y(null, null, terminalLog, true, { window });
Using cypress": "9.1.0"
Hi. It would be great if this library supported an option to target a specific window/document.
This could be achieved with an API like this:
The only annoying thing is you have to inject the axe-core lib into each iframe that you want to check.
What do you think? I'd be happy to submit a PR.