diff options
| author | Marco Trevisan (Treviño) <mail@3v1n0.net> | 2015-08-19 11:11:46 +0200 |
|---|---|---|
| committer | Marco Trevisan (Treviño) <mail@3v1n0.net> | 2015-08-19 11:11:46 +0200 |
| commit | a360ff984f7c3009a58cd753d80307006cf6e95c (patch) | |
| tree | e02273c314dd1767af72eb643f924e88d8c3bb1b | |
| parent | e4ca7b80dc36e7909e44b1b3d5a798dfd68d14a8 (diff) | |
panel: ignore WindowButtons that have not been placed yet, as they're not visible
(bzr r3987.1.6)
| -rw-r--r-- | tests/autopilot/unity/emulators/panel.py | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/tests/autopilot/unity/emulators/panel.py b/tests/autopilot/unity/emulators/panel.py index b77905c59..78b10859d 100644 --- a/tests/autopilot/unity/emulators/panel.py +++ b/tests/autopilot/unity/emulators/panel.py @@ -260,9 +260,12 @@ class WindowButton(UnityIntrospectionObject): self._mouse.move_to_object(self) def mouse_click(self): - if self.sensitive: - self._mouse.click_object(self) - sleep(.01) + # Ignore buttons that are placed at 0x0, as they're invisible yet + if not self.x and not self.y and not self.visible: + return + + self._mouse.click_object(self) + sleep(.01) @property def geometry(self): |
