[virt-tools-list] [PATCH 04/10] uitests: Improve robustness of click_combo_entry()
Povilas Kanapickas
povilas at radix.lt
Sat Sep 1 22:22:12 UTC 2018
Signed-off-by: Povilas Kanapickas <povilas at radix.lt>
---
tests/uitests/utils.py | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/tests/uitests/utils.py b/tests/uitests/utils.py
index c701d330..392611ef 100644
--- a/tests/uitests/utils.py
+++ b/tests/uitests/utils.py
@@ -228,10 +228,12 @@ class VMMDogtailNode(dogtail.tree.Node):
def click_combo_entry(self):
"""
Helper for clicking the arrow of a combo entry, to expose the menu.
- Clicks middle of Y axis, but 1 pixel in from the right side
+ Clicks middle of Y axis, but 1/10th of the height from the right side.
+ Using a small, hardcoded offset may not work on some themes (e.g. when
+ running virt-manager on KDE)
"""
button = 1
- clickX = self.position[0] + self.size[0] - 1
+ clickX = self.position[0] + self.size[0] - self.size[1] / 4
clickY = self.position[1] + self.size[1] / 2
dogtail.rawinput.click(clickX, clickY, button)
--
2.17.1
More information about the virt-tools-list
mailing list