[virt-tools-list] [PATCH 10/10] uitests: Use Ctrl_L+Alt_L+Z as a grab keys when testing prefs

Povilas Kanapickas povilas at radix.lt
Sat Sep 1 22:26:30 UTC 2018


Signed-off-by: Povilas Kanapickas <povilas at radix.lt>
---
 tests/uitests/prefs.py | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/tests/uitests/prefs.py b/tests/uitests/prefs.py
index c55fc2db..0491da2a 100644
--- a/tests/uitests/prefs.py
+++ b/tests/uitests/prefs.py
@@ -33,6 +33,10 @@ class VMMPrefs(uiutils.UITestCase):
         win.find("Console", "page tab").click()
         win.find("Change...", "push button").click()
         keyframe = self.app.root.find_fuzzy("Configure grab", "dialog")
+
+        # On certain environments pressing "Alt_L" and clicking a window starts
+        # window drag operation. Work around by pushing both Control and Alt.
+        self.holdKey("Control_L")
         self.holdKey("Alt_L")
         self.holdKey("Z")
         try:
@@ -40,6 +44,7 @@ class VMMPrefs(uiutils.UITestCase):
         finally:
             self.releaseKey("Z")
             self.releaseKey("Alt_L")
+            self.releaseKey("Control_L")
 
         win.find("Feedback", "page tab").click()
         win.find_fuzzy(None, "check box",
-- 
2.17.1





More information about the virt-tools-list mailing list