New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
TypeError: Cannot read property 'length' of undefined when run test by cypress run #7676
Comments
Hey @sergeyblohin, thanks for opening an issue. Shadow DOM is experimental, so there could be an issue in your case. In order to look into this, we'll need a fully reproducible example so that we can see where the error is throwing from and recreate it ourselves. Please provide a repo with a failing test, or the application code required to run against this. Otherwise, we'll have to close the issue as there's no way forward to investigate. |
@jennifer-shehane, thank you for responding. git clone git@github.com:sergeyblohin/cypress-issue-7676.git
cd cypress-issue-76
npm install
npm run cypress:open
# or
npm run cypress:run
|
@sergeyblohin Thanks for providing a repro! Reproducible example
{
"experimentalShadowDomSupport": true
}
it('experimentalShadowDomSupport', () => {
cy.visit('https://developer.salesforce.com/docs/component-library/overview/components');
cy.get('componentreference-header[class="header dscVisible"]')
.shadow()
.find('componentreference-nav-bar[class="navigation"]')
.should('exist');
})
|
The code for this is done in cypress-io/cypress#7746, but has yet to be released. |
Released in This comment thread has been locked. If you are still experiencing this issue after upgrading to |
Current behavior:
I have testing site with shadow DOM.
It's code work correctly when I use cypress open.
But not work when I use cypress run.
Desired behavior:
What I do wrong?
Versions
Cypress: 4.8.0
Chrome Canary 85
The text was updated successfully, but these errors were encountered: