The command to get the text of the current Element.
Element.text() -> str
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
None
str - The text of the current Element
Last updated 2 years ago