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

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

Issue 2168743004: [system health] Add media browsing stories. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: disable facebook on desktop Created 4 years, 4 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
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 from page_sets.login_helpers import login_utils 4 from page_sets.login_helpers import login_utils
5 5
6 6
7 def LoginWithMobileSite( 7 def LoginWithMobileSite(
8 action_runner, credential, 8 action_runner, credential,
9 credentials_path=login_utils.DEFAULT_CREDENTIAL_PATH): 9 credentials_path=login_utils.DEFAULT_CREDENTIAL_PATH):
10 """Logs in into mobile Facebook account. 10 """Logs in into mobile Facebook account.
(...skipping 15 matching lines...) Expand all
26 credential, credentials_path=credentials_path) 26 credential, credentials_path=credentials_path)
27 27
28 action_runner.Navigate( 28 action_runner.Navigate(
29 'https://m.facebook.com/login?continue=https%3A%2F%2Fm.facebook.com') 29 'https://m.facebook.com/login?continue=https%3A%2F%2Fm.facebook.com')
30 login_utils.InputWithSelector(action_runner, account_name, '[name=email]') 30 login_utils.InputWithSelector(action_runner, account_name, '[name=email]')
31 login_utils.InputWithSelector(action_runner, password, '[name=pass]') 31 login_utils.InputWithSelector(action_runner, password, '[name=pass]')
32 action_runner.ClickElement(selector='[name=login]') 32 action_runner.ClickElement(selector='[name=login]')
33 action_runner.WaitForElement(text='OK') 33 action_runner.WaitForElement(text='OK')
34 action_runner.ClickElement(text='OK') 34 action_runner.ClickElement(text='OK')
35 action_runner.WaitForNavigate() 35 action_runner.WaitForNavigate()
36
37
38 def LoginWithDesktopSite(
39 action_runner, credential,
40 credentials_path=login_utils.DEFAULT_CREDENTIAL_PATH):
41 # Currently we use the mobile login page also on Desktop because the
42 # Desktop version requires enabled cookies and rejects the login.
43 return LoginWithMobileSite(action_runner, credential, credentials_path)
OLDNEW
« no previous file with comments | « tools/perf/page_sets/data/system_health_mobile_040.wpr.sha1 ('k') | tools/perf/page_sets/system_health/browsing_stories.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698