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

Unified Diff: tools/perf/page_sets/login_helpers/pinterest_login.py

Issue 2383883002: [System Health] Add browsing user stories for pinterest and tumblr. (Closed)
Patch Set: make pinterest desktop only Created 4 years, 2 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
Index: tools/perf/page_sets/login_helpers/pinterest_login.py
diff --git a/tools/perf/page_sets/login_helpers/pandora_login.py b/tools/perf/page_sets/login_helpers/pinterest_login.py
similarity index 60%
copy from tools/perf/page_sets/login_helpers/pandora_login.py
copy to tools/perf/page_sets/login_helpers/pinterest_login.py
index c73804dd8eea2ab3d69b977894e409c1c79eabce..ceddcdd4c3827094ebc864ec8e2424cba3cdb07f 100644
--- a/tools/perf/page_sets/login_helpers/pandora_login.py
+++ b/tools/perf/page_sets/login_helpers/pinterest_login.py
@@ -5,7 +5,7 @@
from page_sets.login_helpers import login_utils
-def LoginAccount(action_runner, credential,
+def LoginDesktopAccount(action_runner, credential,
credentials_path=login_utils.DEFAULT_CREDENTIAL_PATH):
"""Logs in into a Dropbox account.
@@ -24,13 +24,19 @@ def LoginAccount(action_runner, credential,
account_name, password = login_utils.GetAccountNameAndPassword(
credential, credentials_path=credentials_path)
- action_runner.Navigate('https://www.pandora.com/account/sign-in')
+ action_runner.Navigate('https://www.pinterest.com/login/')
+ action_runner.Wait(1) # Error page happens if this wait is not here.
login_utils.InputWithSelector(
- action_runner, account_name, 'input[id=login_username]')
+ action_runner, '%s@gmail.com' % account_name, 'input[type=email]')
login_utils.InputWithSelector(
- action_runner, password, 'input[id=login_password]')
+ action_runner, password, 'input[type=password]')
- login_button_function = ('document.getElementsByClassName('
- '"onboarding__form__button onboarding__b1 '
- 'onboarding__form__button--blue loginButton")[0]')
+ login_button_function = (
+ 'document.getElementsByClassName("Button Module btn hasText large '
+ 'primary continueButton rounded")[0]')
+ action_runner.WaitForElement(element_function=login_button_function)
action_runner.ClickElement(element_function=login_button_function)
+
+ search_bar_function = (
+ 'document.getElementsByClassName("Input Module field")[0]')
+ action_runner.WaitForElement(element_function=search_bar_function)
« no previous file with comments | « tools/perf/page_sets/data/system_health_desktop_033.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