-
Notifications
You must be signed in to change notification settings - Fork 91
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
Convert to [attribute] without value #77
Comments
@roniemartinez Thanks to the suggestion. The library should now (since |
@fczbkk Thank you for the very fast work. However shouldn't it return the simplified selector for the test below because the attribute
|
@fczbkk I understand now that the unit test that you did was for the unique element. Please ignore my previous assumption on the said unit test. I think if there are multiple elements passed to
|
@roniemartinez I have added test specifically for this: css-selector-generator/test/selector-attribute.spec.js Lines 95 to 102 in 52acfa7
|
@fczbkk I see but I gave it a go and the results are still not what is intended. Is it because of this scenario?
|
@roniemartinez Yes, exactly. The resulting CSS selector from |
@fczbkk Gotcha. I was hoping there could be a way to force it to get the simplified selector just from 2 or more samples? Think of the same behavior as SelectorGadget? Maybe we can add an option to allow it? |
@roniemartinez I have checked the SelectorGadget. It is a UI tool for iterative building of a selector that matches multiple elements. I think you are looking for a functionality that is out of scope for this library. Something like that could probably be built on top of this library. But it was from the beginning created to produce selectors that are not fuzzy. |
@fczbkk Thanks for looking into this issue. |
Very cool project! 💯
Is it possible to further simplify the selectors if the attribute values are different? For example the output below:
Can be simplified even more like this:
You can replicate this as these are just title links from Google Search page.
The text was updated successfully, but these errors were encountered: