playwright icon indicating copy to clipboard operation
playwright copied to clipboard

[Feature] Add Locator.parent()

Open 304NotModified opened this issue 3 years ago • 1 comments

You know you can get to the parent by doing

page.locator("#locator").locator("..").locator("div").nth(0)

Originally posted by @sgreener in https://github.com/microsoft/playwright/issues/15234#issuecomment-1170212273

304NotModified avatar Aug 02 '22 16:08 304NotModified

While I also like to suggest adding parant method, i still thing we needs the docs for ..

Or isn't a feature?

@mxschmitt I was really confused. Maybe a new issue was better than changing this one?

Update: created a new https://github.com/microsoft/playwright/issues/16243, because otherwise my PR is linked wrong

304NotModified avatar Aug 04 '22 04:08 304NotModified

Why was this issue closed?

Thank you for your involvement. This issue was closed due to limited engagement (upvotes/activity), lack of recent activity, and insufficient actionability. To maintain a manageable database, we prioritize issues based on these factors.

If you disagree with this closure, please open a new issue and reference this one. More support or clarity on its necessity may prompt a review. Your understanding and cooperation are appreciated.

pavelfeldman avatar Nov 16 '23 04:11 pavelfeldman