--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to selenium-user...@googlegroups.com.
To post to this group, send email to seleniu...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msg/selenium-users/-/KYU-3JKIv9AJ.
For more options, visit https://groups.google.com/groups/opt_out.
To view this discussion on the web visit https://groups.google.com/d/msg/selenium-users/-/WB-pY5ecYTcJ.
It’s not a joke. There are lots of things CSS can’t do that XPath can, and at least one of the Selenium developers has measured both and found XPath to be just as fast and in some cases faster. XPath locators aren’t any more brittle than CSS locators. Hand-crafted XPath and CSS locators can be equally reliable, beautiful, and performant.
XPath gets a bad reputation primarily because Selenium IDE and Firebug both recommend really horrible XPath locators, and people use them without thinking. Failing to think is almost always a Bad Thing.
Ross
--
--
You received this message because you are subscribed to a topic in the Google Groups "Selenium Users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/selenium-users/pugZh1AXVMU/unsubscribe.
To unsubscribe from this group and all its topics, send an email to selenium-user...@googlegroups.com.
To post to this group, send email to seleniu...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/selenium-users/ad0e0979-cdc5-4976-9c3d-eb7f32c63d4b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
To view this discussion on the web visit https://groups.google.com/d/msgid/selenium-users/efb7db56-0e44-452d-a00d-9f945caa4db0%40googlegroups.com.
They are just two different types of way of locating the Web element.
They just provide various ways to overcome the challenges faced because of different development technologies.
Now to answer your question, in many Web pages the XPath changes very frequently whereas CSS would be little bit stable. So you need not to change it frequently.
Sometimes if the CSS is same for more than one element, you have to go for XPath(assuming you don't have static id or name or something else ).
Everything has it's own advantages and disadvantages. Just use them accordingly.
Regards,
Suneel oleti
--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to selenium-user...@googlegroups.com.
To post to this group, send email to seleniu...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/selenium-users/f485c7f7-a4fb-4373-bb6b-0d5fa8ae9907%40googlegroups.com.
CSS selectors perform far better than Xpath and it is well documented in Selenium community. Here are some reasons,