The text of the element. Returns: The text of the element. Example: element = driver.find_element(By.ID, "foo") print(element.text)
(self)
| 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. |