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

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

Issue 2334233002: [System Health] Create first System Health media user stories. (Closed)
Patch Set: Add Pandora Created 4 years, 3 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/pandora_login.py
diff --git a/tools/perf/page_sets/login_helpers/dropbox_login.py b/tools/perf/page_sets/login_helpers/pandora_login.py
similarity index 61%
copy from tools/perf/page_sets/login_helpers/dropbox_login.py
copy to tools/perf/page_sets/login_helpers/pandora_login.py
index 8e84981f56ec417048a1d388449fe331872f3ca2..d07184b5abe76c012d1c6629831629cec4b68cec 100644
--- a/tools/perf/page_sets/login_helpers/dropbox_login.py
+++ b/tools/perf/page_sets/login_helpers/pandora_login.py
@@ -24,20 +24,14 @@ def LoginAccount(action_runner, credential,
account_name, password = login_utils.GetAccountNameAndPassword(
credential, credentials_path=credentials_path)
- action_runner.Navigate('https://www.dropbox.com/login')
+
charliea (OOO until 10-5) 2016/09/13 19:38:40 nit: probably okay to delete the second blank line
rnephew (Reviews Here) 2016/09/13 20:17:17 Done.
+ action_runner.Navigate('https://www.pandora.com/account/sign-in')
login_utils.InputWithSelector(
- action_runner, account_name, 'input[name=login_email]')
+ action_runner, account_name, 'input[id=login_username]')
login_utils.InputWithSelector(
- action_runner, password, 'input[name=login_password]')
-
- # Wait until the "Sign in" button is enabled and then click it.
- login_button_selector = '.login-form .login-button'
- action_runner.WaitForJavaScriptCondition('''
- (function() {
- var loginButton = document.querySelector("%s");
- if (!loginButton)
- return false;
- return !loginButton.disabled;
- })();''' % login_button_selector)
- action_runner.ClickElement(selector=login_button_selector)
- action_runner.WaitForNavigate()
+ action_runner, password, 'input[id=login_password]')
+
+ login_button_function = ('document.getElementsByClassName('
+ '"onboarding__form__button onboarding__b1 onboarding'
+ '__form__button--blue loginButton")[0]')
+ action_runner.ClickElement(element_function=login_button_function)

Powered by Google App Engine
This is Rietveld 408576698