Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(182)

Unified Diff: tools/telemetry/telemetry/core/backends/chrome/oobe.py

Issue 1063853008: OOBE sign in fixes for enterprise_PowerManagement (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Inline name&password methods Created 5 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/telemetry/telemetry/core/backends/chrome/oobe.py
diff --git a/tools/telemetry/telemetry/core/backends/chrome/oobe.py b/tools/telemetry/telemetry/core/backends/chrome/oobe.py
index 51d7dac489d7ab08a4c8f271ba15e421dd50f126..16bb89c9e9c4a70eb181d2484a0332e35c016bad 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)
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698