> 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/elements-commands/length.md).

# length

## Syntax

```python
Elements.length() -> int
```

## Usage

{% code title="correct usage" %}

```python
assert py.find("li").length() == 5

---or---

assert py.find("li").should().have_length(5)
```

{% endcode %}

{% code title="incorrect usage" %}

```python
# Errors, 'get' yields Element, not Elements
assert py.get("li").length() == 1
```

{% endcode %}

## Arguments

* None

## Yields

* **int** - The length of the Elements
