Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

124
Vistas
Cypress - how to access the button inside the iFrame located inside the shadow element

I have a problem where I can't access the button inside the iFrame located inside the shadow element.

Here is the HTML code:

<mati-frame>
    #shadow-root (open)
        <iframe>
            <button>
              Start
            </button>
        </iframe>
</mati-frame>
about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

Not sure what you tried. I found the test was flaky depending on how the iframe was set up.

Mostly it failed to find the iframe's contentDocument, but turning off chromeWebSecurity seems to give consistent results.

cypress.json

{
  "chromeWebSecurity": false,
  "includeShadowDom": true
}

Test

cy.get('mati-frame')
  .find('iframe')
  .its('0.contentDocument.body')
  .find('button')                // passes
about 4 years ago · Juan Pablo Isaza Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda