Kaydet (Commit) ba4a3e65 authored tarafından Noel Grandin's avatar Noel Grandin

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: 's avatarNoel Grandin <noel.grandin@collabora.co.uk>
üst 72f55906
......@@ -115,22 +115,23 @@ class UITest(object):
xCrashReportDlg = self._xUITest.getTopFocusWindow()
state = get_state_as_dict(xCrashReportDlg)
print(state)
if state['ID'] == "CrashReportDialog":
if state['ID'] != "CrashReportDialog":
return False
print("found a crash reporter")
xCancelBtn = xCrashReportDlg.getChild("btn_cancel")
self.close_dialog_through_button(xCancelBtn)
else:
raise RuntimeException("not a crashreporter")
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()
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())
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment