Skip to content

Is there any reason get_parent or get_ siblings methods for a element does not exist? #7015

@Songyu-Wang

Description

@Songyu-Wang

🚀 Feature Proposal

Adding a method to allow user to get the parent of a element
Adding a method to allow user to get the siblings of a element

Motivation

If I can find the children element of a element with calling find on that element, why cant I get the parent or siblings?
The implementation should be very simple and those two methods seems like common method ppl use everyday.

Example

Assuming:

<div "some_setting">
<div "some_other_setting"> text </div>
<div> otherstuff </div>
</div>

It would be easier if we can jump from inner div to outer div to check if setting are overwritten correctly

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions