webdriverio / example-recipes

A set of common automation recipes using WebdriverIO
MIT License
21 stars 12 forks source link

The XPath example uses `..` as a selector which doesn't work any more #503

Open aboyton opened 4 weeks ago

aboyton commented 4 weeks ago

It seems with Webdriver v9 you cannot use .. as a selector any more https://github.com/webdriverio/webdriverio/issues/13652

The documentation https://webdriver.io/docs/selectors/#xpath still references .. as it appears to point to https://github.com/webdriverio/example-recipes/blob/e8b147e88e7a38351b0918b4f7efbd9ae292201d/selectors/example.js#L78-L79

This appears to have been commented out as part of #451

502 fixes the code to use .parentElement, but this might be deserving of it's own section.

christian-bromann commented 4 weeks ago

@aboyton thanks for filing the issue. We should update our docs. With WebDriver Bidi this selector doesn't work anymore as once WebdriverIO provides a start node, there is no way anymore to access its parent.