Jump to content
UBot Underground

Xpath Vs Css Selectors


Recommended Posts

According to a research I made, CSS selectors are better than Xpath.

What do you guys think?, They say is more accurate and for a better performance.

Link to post
Share on other sites

Overall xpath is a winner but it also comes down to the person using it.

There are both people who favor css over xpath and the other way around so it depends who you ask.

 

Finding Elements By ID and Class

Browser | CSS | XPath

Internet Explorer 8 | 23 seconds | 22 seconds

Chrome 31 | 17 seconds | 16 seconds

Firefox 26 | 22 seconds | 22 seconds

Opera 12 | 17 seconds | 20 seconds

Safari 5 | 18 seconds | 18 seconds

 

Finding Elements By Traversing

Browser | CSS | XPath

Internet Explorer 8 | not supported | 29 seconds

Chrome 31 | 24 seconds | 26 seconds

Firefox 26 | 27 seconds | 27 seconds

Opera 12 | 25 seconds | 25 seconds

Safari 5 | 23 seconds | 22 seconds

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...