From d4e19a2394f58191b4d60f445988450142650679 Mon Sep 17 00:00:00 2001 From: Markus Mohrhard Date: Thu, 29 Sep 2016 16:36:05 +0200 Subject: allow to listen to different events Change-Id: I4121d35e8052cf25bc2e6089e45c62c3bbcc859a --- uitest/uitest/test.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'uitest/uitest') diff --git a/uitest/uitest/test.py b/uitest/uitest/test.py index 372095880ba7..08834251f0f0 100644 --- a/uitest/uitest/test.py +++ b/uitest/uitest/test.py @@ -79,11 +79,11 @@ class UITest(object): raise DialogNotExecutedException(command) - def execute_dialog_through_action(self, ui_object, action, parameters = None): + def execute_dialog_through_action(self, ui_object, action, parameters = None, event_name = "DialogExecute"): if parameters is None: parameters = tuple() - with EventListener(self._xContext, "DialogExecute") as event: + with EventListener(self._xContext, event_name) as event: ui_object.executeAction(action, parameters) time_ = 0 while time_ < 30: @@ -92,7 +92,7 @@ class UITest(object): return time_ += DEFAULT_SLEEP time.sleep(DEFAULT_SLEEP) - raise DialogNotExecutedException(command) + raise DialogNotExecutedException(action) def create_doc_in_start_center(self, app): xStartCenter = self._xUITest.getTopFocusWindow() -- cgit