summaryrefslogtreecommitdiffstats
path: root/uitest
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2019-01-16 08:25:51 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2019-01-16 09:12:19 +0100
commitba4a3e650531a4832795514cdbd7535281f408aa (patch)
tree397aa7314a999d1b49aa0c3a610b2ec367c9e2b2 /uitest
parenttdf#42949 Fix IWYU warnings in sd/source/ui/[s-u]*/*hxx (diff)
downloadcore-ba4a3e650531a4832795514cdbd7535281f408aa.tar.gz
core-ba4a3e650531a4832795514cdbd7535281f408aa.zip
eliminate some noise from uitest failure
re-arrange the logic so that when create_doc_in_start_center fails, we only get one backtrace instead of two. Change-Id: I736b56da8cfb11e8ef17b8422a19eafd70e3cd6f Reviewed-on: https://gerrit.libreoffice.org/66415 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'uitest')
-rw-r--r--uitest/uitest/test.py21
1 files changed, 11 insertions, 10 deletions
diff --git a/uitest/uitest/test.py b/uitest/uitest/test.py
index 1a72c76fb37b..0855a9d4efc5 100644
--- a/uitest/uitest/test.py
+++ b/uitest/uitest/test.py
@@ -115,22 +115,23 @@ class UITest(object):
xCrashReportDlg = self._xUITest.getTopFocusWindow()
state = get_state_as_dict(xCrashReportDlg)
print(state)
- if state['ID'] == "CrashReportDialog":
- print("found a crash reporter")
- xCancelBtn = xCrashReportDlg.getChild("btn_cancel")
- self.close_dialog_through_button(xCancelBtn)
- else:
- raise RuntimeException("not a crashreporter")
+ if state['ID'] != "CrashReportDialog":
+ return False
+ print("found a crash reporter")
+ xCancelBtn = xCrashReportDlg.getChild("btn_cancel")
+ self.close_dialog_through_button(xCancelBtn)
+ return True
def create_doc_in_start_center(self, app):
xStartCenter = self._xUITest.getTopFocusWindow()
try:
xBtn = xStartCenter.getChild(app + "_all")
except RuntimeException:
- print("Handled crash reporter")
- self._handle_crash_reporter()
- xStartCenter = self._xUITest.getTopFocusWindow()
- xBtn = xStartCenter.getChild(app + "_all")
+ if self._handle_crash_reporter():
+ xStartCenter = self._xUITest.getTopFocusWindow()
+ xBtn = xStartCenter.getChild(app + "_all")
+ else:
+ raise
with EventListener(self._xContext, "OnNew") as event:
xBtn.executeAction("CLICK", tuple())