From 37c157340f90aac9d044aa351e5f98299da7342c Mon Sep 17 00:00:00 2001 From: Stephan Bergmann Date: Tue, 20 Jun 2017 09:45:36 +0200 Subject: Propagate failure out from css.ui.test.XUITest::executeCommand/Dialog Change-Id: Id7bd2d6f35f45d9957facf56d66cfc57a1e0ef6a Reviewed-on: https://gerrit.libreoffice.org/39002 Tested-by: Jenkins Reviewed-by: Markus Mohrhard --- uitest/uitest/test.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'uitest') diff --git a/uitest/uitest/test.py b/uitest/uitest/test.py index 04168c48ae2a..f477369154fa 100644 --- a/uitest/uitest/test.py +++ b/uitest/uitest/test.py @@ -70,7 +70,8 @@ class UITest(object): def execute_dialog_through_command(self, command): with EventListener(self._xContext, "DialogExecute") as event: - self._xUITest.executeDialog(command) + if not self._xUITest.executeDialog(command): + raise DialogNotExecutedException(command) time_ = 0 while time_ < MAX_WAIT: if event.executed: @@ -83,7 +84,8 @@ class UITest(object): def execute_modeless_dialog_through_command(self, command): with EventListener(self._xContext, "ModelessDialogVisible") as event: - self._xUITest.executeCommand(command) + if not self._xUITest.executeCommand(command): + raise DialogNotExecutedException(command) time_ = 0 while time_ < MAX_WAIT: if event.executed: @@ -160,7 +162,8 @@ class UITest(object): def close_doc(self): with EventListener(self._xContext, ["DialogExecute", "OnViewClosed"] ) as event: - self._xUITest.executeDialog(".uno:CloseDoc") + if not self._xUITest.executeDialog(".uno:CloseDoc"): + print(".uno:CloseDoc failed") time_ = 0 while time_ < MAX_WAIT: if event.hasExecuted("DialogExecute"): -- cgit