MCPcopy Create free account
hub / github.com/SeleniumHQ/selenium / text

Method text

py/selenium/webdriver/remote/webelement.py:98–108  ·  view source on GitHub ↗

The text of the element. Returns: The text of the element. Example: element = driver.find_element(By.ID, "foo") print(element.text)

(self)

Source from the content-addressed store, hash-verified

96
97 @property
98 def text(self) -> str:
99 """The text of the element.
100
101 Returns:
102 The text of the element.
103
104 Example:
105 element = driver.find_element(By.ID, "foo")
106 print(element.text)
107 """
108 return self._execute(Command.GET_ELEMENT_TEXT)["value"]
109
110 def click(self) -> None:
111 """Clicks the element.

Callers

nothing calls this directly

Calls 1

_executeMethod · 0.95

Tested by

no test coverage detected