Get the ID used by selenium. This is mainly for internal use. Simple use cases such as checking if 2 webelements refer to the same element, can be done using ``==``:: Example: if element1 == element2: print("These 2 are equal")
(self)
| 498 | |
| 499 | @property |
| 500 | def id(self) -> str: |
| 501 | """Get the ID used by selenium. |
| 502 | |
| 503 | This is mainly for internal use. Simple use cases such as checking if 2 |
| 504 | webelements refer to the same element, can be done using ``==``:: |
| 505 | |
| 506 | Example: |
| 507 | if element1 == element2: |
| 508 | print("These 2 are equal") |
| 509 | """ |
| 510 | return self._id |
| 511 | |
| 512 | def __eq__(self, element): |
| 513 | return hasattr(element, "id") and self._id == element.id |
nothing calls this directly
no outgoing calls
no test coverage detected