-
Notifications
You must be signed in to change notification settings - Fork 291
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
expect(element).toMatchTextContent? #53
Comments
|
Oh hey sorry @neoziro could you please re-open the issue? That throws an error with
|
Do you use |
I do, and other parts of it work correctly. Perhaps the issue is that it's taking in an element instead of the page? I haven't had time to look too closely... |
It should work element too, maybe the detection is failing, it is actually a bug. |
@JoshuaKGoldberg still relevant? |
I've switched from Puppeteer to Selenium so I have no idea. I'll just close the issue in the hopes that nobody will report it again. Thanks! |
So I'm trying to do this with an element handle and it doesn't work as expected. Example: const element = await page.$('#element');
expect(element).toMatch("MyText") I looked at the code and it tries to access const textProperty = await element.getProperty("textContent");
const textContent = await textProperty.jsonValue(); |
Hello @scragg0x, I think you forgot |
Here's what I'm doing now:
I'd be nice to have a concise one-liner:
The text was updated successfully, but these errors were encountered: