Get the location of the element in the renderable canvas. Returns: The x and y coordinates of the element. Example: loc = element.location
(self)
| 361 | |
| 362 | @property |
| 363 | def location(self) -> dict: |
| 364 | """Get the location of the element in the renderable canvas. |
| 365 | |
| 366 | Returns: |
| 367 | The x and y coordinates of the element. |
| 368 | |
| 369 | Example: |
| 370 | loc = element.location |
| 371 | """ |
| 372 | old_loc = self._execute(Command.GET_ELEMENT_RECT)["value"] |
| 373 | new_loc = {"x": round(old_loc["x"]), "y": round(old_loc["y"])} |
| 374 | return new_loc |
| 375 | |
| 376 | @property |
| 377 | def rect(self) -> dict: |