text
The command to get the text of the current Element.
Syntax
Element.text() -> str
Usage
assert py.get(".nav.link").text() == "About"
---or---
assert py.get(".nav.link").should().have_text("About")
# Errors, 'text' is not a property
py.get("a").text
Arguments
None
Yields
str - The text of the current Element
Last updated