New answers tagged

2

My main criteria is readability and maintainability. Speed has never been as issue for me. There's other parts of the test frameworks I use that have much more significant speed issues. The basic idea is always 'what will it take to uniquely identify the element' with two principles: Don't over specify the page structure - this will make the selector ...


0

It depends on by which locator your element get located, but you should always follow the order following is top priority(fast) to low priority(slow) locator. ID Name Link text Partial link text Tag name Class name CSS Xpath



Top 50 recent answers are included