TypeError: container.querySelectorAll is not a function
See original GitHub issuecypress-testing-library
version: 5.1.1node
version: 12.4.0npm
(oryarn
) version: 1.21.1 (yarn)
Relevant code or config
describe('anonymous calculator', () => {
it('can make calculations', () => {
cy.visit('/')
.findByText(/^1$/)
.click()
.findByText(/^\+$/)
.click()
.findByText(/^2$/)
.click()
.findByText(/^=$/)
.click()
.findByTestId('total')
.should('have.text', '3')
})
})
What you did: Attempted to run tjs/cypress-04 branch of https://github.com/kentcdodds/jest-cypress-react-babel-webpack/tree/tjs/cypress-04
What happened:

Reproduction repository: https://github.com/kentcdodds/jest-cypress-react-babel-webpack/tree/tjs/cypress-04
Problem description:
TypeError: container.querySelectorAll is not a function
Suggested solution:
–
Issue Analytics
- State:
- Created 4 years ago
- Comments:20 (12 by maintainers)
Top Results From Across the Web
querySelectorAll is not a function - Stack Overflow
You are trying to call it on the return value of a call to querySelectorAll which returns a Node List (which is an...
Read more >TypeError container.queryselectorall is not a function #526
collapse › encountered a declaration exception TypeError: container.querySelectorAll is not a function. Here is my collapse implementation.
Read more >TypeError: querySelectorAll is not a function in JS | bobbyhadz
To solve the "querySelectorAll is not a function" error, make sure to only call the querySelectorAll method on a valid DOM element or...
Read more >Uncaught TypeError: t.querySelectorAll is not a function
getElementsByClassName("containers") );. I'm getting this error inside Twitter's widget.js: Uncaught TypeError: t.querySelectorAll is not a ...
Read more >Document.querySelectorAll() - Web APIs | MDN
The Document method querySelectorAll() returns a static (not live) NodeList ... querySelector("#test"); const matches = container.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
For people who came across this issue, from what I understand, starting from
@testing-library/cypress@6.0.0
, they are no longer supporting chaining of multiplefind*
commands. So, you’ll have to write it asMore discussion about this decision on: https://github.com/testing-library/cypress-testing-library/issues/110
@kentcdodds @tlrobinson please correct me if I’m wrong. Also, it would be helpful to add this change to release changelog: https://github.com/testing-library/cypress-testing-library/releases.
🎉 This issue has been resolved in version 5.2.0 🎉
The release is available on:
npm package (@latest dist-tag)
Your semantic-release bot 📦🚀