HtmlAgilityPack.CssSelectors.NetCore icon indicating copy to clipboard operation
HtmlAgilityPack.CssSelectors.NetCore copied to clipboard

multiple '>' not yielding the desired element

Open tavisca-kpatil opened this issue 4 years ago • 1 comments

I have selector 'div.traveler-details>div>span' where it should yield single element( as tested on dev tools(Elements tab) image

Finding the wrong element with this library though.

tavisca-kpatil avatar Dec 17 '20 06:12 tavisca-kpatil

I suspect this could be specifically because of not having a space preceding the '>' character which is a bug that was already fixed but a new version of the package has not been published to include it. To corroborate try the following selector string instead and check if it yields correct results:

div.traveler-details > div > span instead of div.traveler-details>div>span

Here is the fix that was checked in for that: https://github.com/trenoncourt/HtmlAgilityPack.CssSelectors.NetCore/commit/7537c41ae2e0460c4e90aa51cc44957cd4f38cc4

BoricuaEnLaLuna avatar Jul 17 '22 07:07 BoricuaEnLaLuna