[PATCH 04/10] uitests: Improve robustness of click_combo_entry()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Signed-off-by: Povilas Kanapickas <povilas@xxxxxxxx>
---
 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


_______________________________________________
virt-tools-list mailing list
virt-tools-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/virt-tools-list



[Index of Archives]     [Linux Virtualization]     [KVM Development]     [CentOS Virtualization]     [Netdev]     [Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite Forum]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]     [Video 4 Linux]

  Powered by Linux