Skip to content

[BUG] initial combinator in a :has() selector not working #9233

@thewilkybarkid

Description

@thewilkybarkid

Context:

  • OS: macOS 11.6
  • Memory: 81.65 MB / 16.00 GB
  • Node: 14.17.3
  • npm: 6.14.13
  • Bash: 5.1.4
  • Playwright: 1.15.0

Code Snippet

await page.waitForSelector('a:has(> img)')

Describe the bug

The :has() pseudo-class documentation links to the MDN page for :has(), which has an example selector a:has(> img).

Using a:has(> img) in Playwright results in a Unexpected token ">" while parsing selector "a:has(> img)".

Is this meant to be supported? If not, the Playwright docs should be updated to include what :has() does support.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions