Commit 4a7abc68 authored by Clifford Cheng's avatar Clifford Cheng Committed by Commit Bot

Handle the timeout exception when closing the dialog.

Sometimes the function failed to find the "close-button" because it's closed.
This can be due to a recent change in telemetry. See bug for more details.

Bug: 884929
Change-Id: I47af2f8e87431120d5dfebba3d25ead91d98f565
Reviewed-on: https://chromium-review.googlesource.com/1229359
Commit-Queue: Clifford Cheng <cliffordcheng@chromium.org>
Reviewed-by: default avatarDerek Cheng <imcheng@chromium.org>
Cr-Commit-Position: refs/heads/master@{#592532}
parent 34893e97
...@@ -38,11 +38,14 @@ class CastPage(page.Page): ...@@ -38,11 +38,14 @@ class CastPage(page.Page):
'shadowRoot.getElementById("container-header").shadowRoot.' + 'shadowRoot.getElementById("container-header").shadowRoot.' +
'getElementById("close-button").click();') 'getElementById("close-button").click();')
except (exceptions.DevtoolsTargetCrashException, except (exceptions.DevtoolsTargetCrashException,
exceptions.EvaluateException): exceptions.EvaluateException,
exceptions.TimeoutException):
# Ignore the crash exception, this exception is caused by the js # Ignore the crash exception, this exception is caused by the js
# code which closes the dialog, it is expected. # code which closes the dialog, it is expected.
# Ignore the evaluate exception, this exception maybe caused by the dialog # Ignore the evaluate exception, this exception maybe caused by the dialog
# is closed/closing when the JS is executing. # is closed/closing when the JS is executing.
# Ignore the timeout exception, this exception can be caused by finding
# the close-button on a dialog that is already closed.
pass pass
......
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