(Coordinates are relative to the screen. Not the window.)
(self, selector, timeout=None)
| 1653 | return ({"height": e_height, "width": e_width, "x": x, "y": y}) |
| 1654 | |
| 1655 | def get_gui_element_center(self, selector, timeout=None): |
| 1656 | """(Coordinates are relative to the screen. Not the window.)""" |
| 1657 | if not timeout: |
| 1658 | timeout = settings.SMALL_TIMEOUT |
| 1659 | element_rect = self.get_gui_element_rect(selector, timeout=timeout) |
| 1660 | e_width = element_rect["width"] |
| 1661 | e_height = element_rect["height"] |
| 1662 | e_x = element_rect["x"] |
| 1663 | e_y = element_rect["y"] |
| 1664 | return ((e_x + e_width / 2.0) + 0.5, (e_y + e_height / 2.0) + 0.5) |
| 1665 | |
| 1666 | def get_document(self): |
| 1667 | return self.loop.run_until_complete(self.page.get_document()) |
no test coverage detected