checkly / headless-recorder

Chrome extension that records your browser interactions and generates a Playwright or Puppeteer script.
https://checklyhq.com/headless-recorder
MIT License
15.03k stars 722 forks source link

CSS selector library is not very good, should replace #5

Closed tnolet closed 6 years ago

tnolet commented 6 years ago

The library used for generating CSS selectors [0] from HTML nodes is a bit flaky. Even the https://checklyhq.com/docs/ generates css selectors that don't work in Puppeteer.

For a link on the side bar it generates

:nth-child(1) > .sidebar-menu-sub > :nth-child(4) > a

[0] https://github.com/fczbkk/css-selector-generator

transitive-bullshit commented 6 years ago

finder seems like the best library I could find for this purpose.

Also see this (somewhat dated) comparison: https://github.com/fczbkk/css-selector-generator-benchmark

tnolet commented 6 years ago

@transitive-bullshit I'm going to do some testing on this.