4 ms·
Why industry tend to use CSS selectors instead of XPath? What is better to select nodes in HTML: CSS selectors or XPath queries? We discuss these questions in
by ilyazub 4y ago
Why industry tend to use CSS selectors instead of XPath? What is better to select nodes in HTML: CSS selectors or XPath queries?
We discuss these questions in this episode.
- forgotmypw17 4y agoWhat's the verdict? I've never tried using CSS selectors, but it seems like they would generally be less flexible and able? XPath seems to have worked well for me.
- Minor49er 4y agoSelectors are typically more concise and easier for developers to use if they have front end development experience. XPath has marginal benefits over it, like referencing parents/ancestors, but you can often construct a selector to target the elements you want anyways. But since they are so similar, it really comes down to what you work faster with