-
Notifications
You must be signed in to change notification settings - Fork 470
TestingLibraryElementError: Unable to find an element with the text - This could be because the text is broken up by multiple elements #1196
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
Comments
Closing this this because it isn't an issue. |
Thanks, I can solve the problem. |
@por14571-jochoa How did you solve this problem? |
Uh oh! @snolan-ethika, the image you shared is missing helpful alt text. Check #1196 (comment). Alt text is an invisible description that helps screen readers describe images to blind or low-vision users. If you are using markdown to display images, add your alt text inside the brackets of the markdown image. Learn more about alt text at Basic writing and formatting syntax: images on GitHub Docs. |
I stumbled upon this thread, it kind of pointed me in the right direction finally... hope it helps you out https://stackoverflow.com/a/65951158 |
Hello, tell us how you solved it, please |
@thamaraRD I was able to solve this by manually setting the component's template with the necessary info, it doesn't feel right having to do this, but it was getting me by. I didn't spend a lot of time figuring out another way, but this helped me get it going. |
For anyone having this issue, if your div has a text like "Read our docs" and you search for getByText("docs") it will cause the error. |
Hello, I have a problem, i try to find some elements and gets a problem with the library, it doesn't find the queries.
If someone know about how to fix this problem.
TestingLibraryElementError: Unable to find an element with the text: /Texto./i. This could be because the text is broken up by multiple elements. In this case, you can provide a function for your text matcher to make your matcher more flexible.
❓ Support Forums
https://stackoverflow.com/questions/tagged/react-testing-library
ISSUES WHICH ARE QUESTIONS WILL BE CLOSED
The text was updated successfully, but these errors were encountered: