diff --git a/tests/uitests/newvm.py b/tests/uitests/newvm.py index 4013f8a6..b83b662f 100644 --- a/tests/uitests/newvm.py +++ b/tests/uitests/newvm.py @@ -58,7 +58,8 @@ class NewVM(uiutils.UITestCase): delete = uiutils.find_fuzzy(self.app.root, "Delete", "frame") uiutils.find_fuzzy(delete, "Delete", "button").click() - alert = uiutils.find_pattern(self.app.root, "Warning", "alert") + alert = uiutils.find_pattern(self.app.root, + "vmm error dialog", "alert") uiutils.find_fuzzy(alert, "Yes", "push button").click() # Verify delete dialog and VM dialog are now gone @@ -215,7 +216,8 @@ class NewVM(uiutils.UITestCase): uiutils.find_fuzzy(newvm, "Forward", "button").click() # Disk collision box pops up, hit ok - alert = uiutils.find_pattern(self.app.root, "Warning", "alert") + alert = uiutils.find_pattern(self.app.root, + "vmm simple dialog", "alert") uiutils.find_fuzzy(alert, "Yes", "push button").click() uiutils.find_fuzzy(newvm, "Forward", "button").click() diff --git a/tests/uitests/prefs.py b/tests/uitests/prefs.py index d02c2fc8..fa6528d2 100644 --- a/tests/uitests/prefs.py +++ b/tests/uitests/prefs.py @@ -2,18 +2,17 @@ import dogtail import pyatspi from tests.uitests import utils as uiutils -import time # From dogtail 9.9.0 which isn't widely distributed yet def _holdKey(keyName): code = dogtail.rawinput.keyNameToKeyCode(keyName) - pyatspi.Registry.generateKeyboardEvent(code, None, pyatspi.KEY_PRESS) + pyatspi.Registry().generateKeyboardEvent(code, None, pyatspi.KEY_PRESS) def _releaseKey(keyName): code = dogtail.rawinput.keyNameToKeyCode(keyName) - pyatspi.Registry.generateKeyboardEvent(code, None, pyatspi.KEY_RELEASE) + pyatspi.Registry().generateKeyboardEvent(code, None, pyatspi.KEY_RELEASE) class VMMPrefs(uiutils.UITestCase): diff --git a/virtManager/error.py b/virtManager/error.py index 1a8fae5a..7829d13a 100644 --- a/virtManager/error.py +++ b/virtManager/error.py @@ -127,6 +127,7 @@ class vmmErrorDialog(vmmGObject): if self._simple: self._simple.destroy() self._simple = dialog + self._simple.get_accessible().set_name("vmm simple dialog") return _launch_dialog(self._simple, text1, text2 or "", title or "", @@ -319,6 +320,8 @@ class _errorDialog (Gtk.MessageDialog): if hasattr(child, "set_max_width_chars"): child.set_max_width_chars(40) + self.get_accessible().set_name("vmm error dialog") + self.chk_vbox = None self.chk_align = None self.init_chkbox()