fczbkk / css-selector-generator

JavaScript object that creates unique CSS selector for given element.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Comparison with prior art

dandv opened this issue · comments

I'm looking for a library to generate unique CSS selectors for DOM elements in an arbitrary page (see 1, 2, 3, 4).

In case you looked at existing alternatives before coding a new one from scratch, how does this library compare with @martinsbalodis's css-selector, which started development before this one and even has almost the same name, which suggests you might have searched for it.

Thanks for the detailed comparison with @olivierrr's library.

Forgot to mention - Chromium's also has a cssPath library.

BTW, thanks again for your work on this. I've posted an answer on this SO question, trying to create awareness that generating unique and relatively robust selectors is a non-trivial problem. The repo had 11 stars at the time.