> 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/element-data/text.md).

# text

## Syntax

```python
Element.text() -> str
```

## Usage

{% code title="correct usage" %}

```python
assert py.get(".nav.link").text() == "About"

---or---

assert py.get(".nav.link").should().have_text("About")
```

{% endcode %}

{% code title="incorrect usage" %}

```python
# Errors, 'text' is not a property
py.get("a").text
```

{% endcode %}

## Arguments

* None

## Yields

* <mark style="color:orange;">**str**</mark> - The text of the current Element
