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

Side by Side Diff: tools/perf/page_sets/login_helpers/login_utils.py

Issue 1198823004: Update perf page_set to use story_set (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 6 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 unified diff | Download patch
« no previous file with comments | « tools/perf/page_sets/key_silk_cases.py ('k') | tools/perf/page_sets/maps.py » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Copyright 2015 The Chromium Authors. All rights reserved. 1 # Copyright 2015 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be 2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file. 3 # found in the LICENSE file.
4 4
5 import json
5 import os 6 import os
6 import json
7
8 7
9 DEFAULT_CREDENTIAL_PATH = os.path.join( 8 DEFAULT_CREDENTIAL_PATH = os.path.join(
10 os.path.dirname(__file__), os.path.pardir, 'data', 'credentials.json') 9 os.path.dirname(__file__), os.path.pardir, 'data', 'credentials.json')
11 10
12 11
13 def GetAccountNameAndPassword(credential, 12 def GetAccountNameAndPassword(credential,
14 credentials_path=DEFAULT_CREDENTIAL_PATH): 13 credentials_path=DEFAULT_CREDENTIAL_PATH):
15 """Returns username and password for |credential| in credentials_path file. 14 """Returns username and password for |credential| in credentials_path file.
16 15
17 Args: 16 Args:
(...skipping 30 matching lines...) Expand all
48 if form_id and input_id: 47 if form_id and input_id:
49 element_selector = '#%s #%s' % (form_id, input_id) 48 element_selector = '#%s #%s' % (form_id, input_id)
50 elif input_id: 49 elif input_id:
51 element_selector = '#%s' % (input_id) 50 element_selector = '#%s' % (input_id)
52 else: 51 else:
53 raise ValueError("Input ID can not be None or empty.") 52 raise ValueError("Input ID can not be None or empty.")
54 action_runner.WaitForElement(selector=element_selector) 53 action_runner.WaitForElement(selector=element_selector)
55 action_runner.ExecuteJavaScript( 54 action_runner.ExecuteJavaScript(
56 'document.querySelector("%s").value = "%s";' % 55 'document.querySelector("%s").value = "%s";' %
57 (element_selector, input_text)) 56 (element_selector, input_text))
OLDNEW
« no previous file with comments | « tools/perf/page_sets/key_silk_cases.py ('k') | tools/perf/page_sets/maps.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698