-
Notifications
You must be signed in to change notification settings - Fork 3.9k
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
[BUG] Issue with chained selectors -- text selector doesn't work #4865
Comments
Could you please try printing element's text content? I expect that your target element has line breaks, and therefore console.log(await page.textContent('div[role="radiogroup"] >> text=No')) Also note that |
Thank you @dgozman for the quick response.
|
await page.click('div[role="radiogroup"] >> text="No"') // DOES NOT WORK, I expect it to work though. I do not expect this snippet to work, because it requires strict match while text has whitespace inside.
Yes, it works because matching without quotes is relaxed. Quoting the docs: "By default, the match is case-insensitive, ignores leading/trailing whitespace and searches for a substring". |
Context:
Describe the bug
When I use chained selectors, I observe the following behavior. Not sure if this is intended or what.
I have attached a screenshot of my DOM.
The text was updated successfully, but these errors were encountered: