DEV Community

Discussion on: A Practical Guide for Finding Elements with Selenium

Collapse
 
jamesblewis profile image
James Lewis

Hey Klaus,
A really helpful read for anyone starting selenium testing. It may interest you to note the actual performance difference between X Path and CSS selectors. X path can actually be really inconsistent performance-wise between browsers as there are several different X Path engines.

elementalselenium.com/tips/34-xpat...

While X Path can be really handy in cases such as finding a parent element or simply searching for an element by its text. It seems CSS selectors would be a first and X Path would be a fallback option if your testing cannot be achieved with selectors. (assuming the same order in your article)