> For the complete documentation index, see [llms.txt](https://docs.pylenium.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.pylenium.io/element-commands/family/parent.md).

# parent

## Syntax

```python
Element.parent() -> Element
```

## Usage

{% code title="correct usage" %}

```python
py.get("li").parent()

---or--- # store in a variable

element = py.get("li").parent()

---or--- # chain an Element command

py.get("li").parent().click()

---or--- # even go up the DOM tree

grand_parent = py.get("li").parent().parent()
```

{% endcode %}

## Arguments

* None

## Yields

* <mark style="color:orange;">**Element**</mark> - The parent Element
