summaryrefslogtreecommitdiff
path: root/uitest
diff options
context:
space:
mode:
authorXisco Fauli <xiscofauli@libreoffice.org>2021-06-28 16:52:26 +0200
committerXisco Fauli <xiscofauli@libreoffice.org>2021-06-29 13:24:54 +0200
commit279ab35ad07a958b5b8d7d593b9817e7365b9bb5 (patch)
tree725d143d62d22e1ce9bf44f3f58ef3907f24498f /uitest
parentbeeb10a097cdb44af931b92d2849a7e4d09414c0 (diff)
uitest: guard execute_dialog_through_command in sc
Mostly done with a script for motivation, see 89aaa17a0a4413f07da2bc5084b0164f15dc01ac < UITest: introduce guarded context managers > Change-Id: Id49eb66ba2827a6e2d0a737e48726a1d1c49c814 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118029 Tested-by: Xisco Fauli <xiscofauli@libreoffice.org> Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Diffstat (limited to 'uitest')
-rw-r--r--uitest/uitest/test.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/uitest/uitest/test.py b/uitest/uitest/test.py
index d4a953715978..dbb2a7c046d5 100644
--- a/uitest/uitest/test.py
+++ b/uitest/uitest/test.py
@@ -126,7 +126,8 @@ class UITest(object):
try:
yield xDialog
finally:
- self.close_dialog_through_button(xDialog.getChild(close_button))
+ if close_button:
+ self.close_dialog_through_button(xDialog.getChild(close_button))
def execute_modeless_dialog_through_command(self, command, printNames=False):
with EventListener(self._xContext, "ModelessDialogVisible", printNames = printNames) as event: