uitest: remove crash report handler

Unneded since a4a1f2ecee
"Disallow crash reporting in UITests"

Change-Id: I661b6111bd5142e67ee73a82c0777771e7651300
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/160324
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
This commit is contained in:
Xisco Fauli 2023-12-04 20:41:06 +01:00
parent b63a12d481
commit 6b41d3f677

View file

@ -176,17 +176,6 @@ class UITest(object):
return return
time.sleep(DEFAULT_SLEEP) time.sleep(DEFAULT_SLEEP)
def _handle_crash_reporter(self):
xCrashReportDlg = self._xUITest.getTopFocusWindow()
state = get_state_as_dict(xCrashReportDlg)
print(state)
if state['ID'] != "CrashReportDialog":
return False
print("found a crash reporter")
xCancelBtn = xCrashReportDlg.getChild("btn_cancel")
self.close_dialog_through_button(xCancelBtn)
return True
# Calls UITest.close_doc at exit # Calls UITest.close_doc at exit
@contextmanager @contextmanager
def create_doc_in_start_center(self, app): def create_doc_in_start_center(self, app):
@ -194,11 +183,7 @@ class UITest(object):
try: try:
xBtn = xStartCenter.getChild(app + "_all") xBtn = xStartCenter.getChild(app + "_all")
except RuntimeException: except RuntimeException:
if self._handle_crash_reporter(): raise
xStartCenter = self._xUITest.getTopFocusWindow()
xBtn = xStartCenter.getChild(app + "_all")
else:
raise
with EventListener(self._xContext, "OnNew") as event: with EventListener(self._xContext, "OnNew") as event:
xBtn.executeAction("CLICK", tuple()) xBtn.executeAction("CLICK", tuple())