April 15, 2018 at 11:48 pm #19175@darwinOnly available when logged in
How often and when do you like to use XPath?
I was always advised to give least importance to XPath (structure based locator)April 21, 2018 at 4:49 pm #19228@rpwheelerOnly available when logged in
Not very often, but I don’t hesitate to use it where it suits me. Years ago people talked about XPath performance problems, in the same time in my tests I found that CSS pseudo-classes do not work for me in some browsers. A few years ago one guy posting to automation community tested performance of the two types and his conclusion was that XPath performance is as good as CSS selectors (providing both are built reasonably). Support of CSS pseudo-classes also developed.
So — use whatever suits you, the most important thing IMO is that your locators look reasonable and are bound to some well-marking attribute, not just to the structure.April 22, 2018 at 9:03 pm #19230
You must be logged in to reply to this topic.