diff options
author | resetswitch <resetswitch@chromium.org> | 2015-04-24 15:55:18 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-04-24 22:55:26 +0000 |
commit | 73106a2356a596e8d831019c3de62d0920e4f7c7 (patch) | |
tree | 071e24347f09ab1c1020e2f6adfaf3ecca83f36b /tools | |
parent | 47b4c2f01324a903410ae9530156c2469601e91b (diff) | |
download | chromium_src-73106a2356a596e8d831019c3de62d0920e4f7c7.zip chromium_src-73106a2356a596e8d831019c3de62d0920e4f7c7.tar.gz chromium_src-73106a2356a596e8d831019c3de62d0920e4f7c7.tar.bz2 |
OOBE sign in fixes for enterprise_PowerManagement
Debugging some tests that were unblocked by codereview.chromium.org/1084793002, I found that waiting for the password field to disappear sometimes fails. We need to wait for the OOBE page to disappear before continuing to the test logic.
BUG=480571
Review URL: https://codereview.chromium.org/1063853008
Cr-Commit-Position: refs/heads/master@{#326915}
Diffstat (limited to 'tools')
-rw-r--r-- | tools/telemetry/telemetry/core/backends/chrome/oobe.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/tools/telemetry/telemetry/core/backends/chrome/oobe.py b/tools/telemetry/telemetry/core/backends/chrome/oobe.py index 51d7dac..16bb89c 100644 --- a/tools/telemetry/telemetry/core/backends/chrome/oobe.py +++ b/tools/telemetry/telemetry/core/backends/chrome/oobe.py @@ -91,7 +91,11 @@ class Oobe(web_contents.WebContents): def _NavigateWebViewLogin(self, username, password): """Logs into the webview-based GAIA screen""" self._NavigateWebViewEntry('identifierId', username) + self._GaiaWebViewContext().WaitForJavaScriptExpression( + "document.getElementById('identifierId') == null", 20) + self._NavigateWebViewEntry('password', password) + util.WaitFor(lambda: self._GaiaWebViewContext() == None, 20) def _NavigateWebViewEntry(self, field, value): self._WaitForField(field) @@ -101,8 +105,6 @@ class Oobe(web_contents.WebContents): document.getElementById('%s').value='%s'; document.getElementById('next').click()""" % (field, value)) - gaia_webview_context.WaitForJavaScriptExpression( - "document.getElementById('%s') == null" % field, 20) def _WaitForField(self, field_id): gaia_webview_context = util.WaitFor(self._GaiaWebViewContext, 5) |