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

Side by Side Diff: components/test/data/password_manager/automated_tests/tests.py

Issue 992223002: [Password manager tests automation] Tests for alexa.com (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 9 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 | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # -*- coding: utf-8 -*- 1 # -*- coding: utf-8 -*-
2 # Copyright 2014 The Chromium Authors. All rights reserved. 2 # Copyright 2014 The Chromium Authors. All rights reserved.
3 # Use of this source code is governed by a BSD-style license that can be 3 # Use of this source code is governed by a BSD-style license that can be
4 # found in the LICENSE file. 4 # found in the LICENSE file.
5 5
6 """Automated tests for many websites""" 6 """Automated tests for many websites"""
7 7
8 import argparse 8 import argparse
9 import logging 9 import logging
10 10
(...skipping 10 matching lines...) Expand all
21 ENABLED_TESTS = 1 21 ENABLED_TESTS = 1
22 # Runs all the tests. 22 # Runs all the tests.
23 ALL_TESTS = 2 23 ALL_TESTS = 2
24 # Runs a specified list of tests. 24 # Runs a specified list of tests.
25 LIST_OF_TESTS = 3 25 LIST_OF_TESTS = 3
26 26
27 def __init__(self): 27 def __init__(self):
28 pass 28 pass
29 29
30 30
31 class Alexa(WebsiteTest):
32
33 def Login(self):
34 self.GoTo("https://www.alexa.com/secure/login")
35 self.FillUsernameInto("#email")
36 self.FillPasswordInto("#pwd")
37 self.Submit("#pwd")
38
39
31 class Facebook(WebsiteTest): 40 class Facebook(WebsiteTest):
32 41
33 def Login(self): 42 def Login(self):
34 self.GoTo("https://www.facebook.com") 43 self.GoTo("https://www.facebook.com")
35 self.FillUsernameInto("[name='email']") 44 self.FillUsernameInto("[name='email']")
36 self.FillPasswordInto("[name='pass']") 45 self.FillPasswordInto("[name='pass']")
37 self.Submit("[name='pass']") 46 self.Submit("[name='pass']")
38 47
39 48
40 class Google(WebsiteTest): 49 class Google(WebsiteTest):
(...skipping 220 matching lines...) Expand 10 before | Expand all | Expand 10 after
261 self.FillPasswordInto("[ng-model='login.pass']") 270 self.FillPasswordInto("[ng-model='login.pass']")
262 while (self.IsDisplayed("[ng-model='login.pass']") 271 while (self.IsDisplayed("[ng-model='login.pass']")
263 and not self.IsDisplayed(".prompt.alert")): 272 and not self.IsDisplayed(".prompt.alert")):
264 self.ClickIfClickable("[ng-click='login()']") 273 self.ClickIfClickable("[ng-click='login()']")
265 self.Wait(1) 274 self.Wait(1)
266 275
267 276
268 def Tests(environment, tests_to_run=None): 277 def Tests(environment, tests_to_run=None):
269 278
270 working_tests = { 279 working_tests = {
280 "alexa": Alexa("alexa"),
271 "facebook": Facebook("facebook"), 281 "facebook": Facebook("facebook"),
272 "google": Google("google"), 282 "google": Google("google"),
273 "linkedin": Linkedin("linkedin"), 283 "linkedin": Linkedin("linkedin"),
274 "mailru": Mailru("mailru"), 284 "mailru": Mailru("mailru"),
275 "nytimes": Nytimes("nytimes"), 285 "nytimes": Nytimes("nytimes"),
276 "odnoklassniki": Odnoklassniki("odnoklassniki"), 286 "odnoklassniki": Odnoklassniki("odnoklassniki"),
277 "pinterest": Pinterest("pinterest"), 287 "pinterest": Pinterest("pinterest"),
278 "reddit": Reddit("reddit", username_not_auto=True), 288 "reddit": Reddit("reddit", username_not_auto=True),
279 "tumblr": Tumblr("tumblr", username_not_auto=True), 289 "tumblr": Tumblr("tumblr", username_not_auto=True),
280 "twitter": Twitter("twitter"), 290 "twitter": Twitter("twitter"),
(...skipping 194 matching lines...) Expand 10 before | Expand all | Expand 10 after
475 args.profile_path[0], 485 args.profile_path[0],
476 passwords_path, 486 passwords_path,
477 True, 487 True,
478 numeric_level, 488 numeric_level,
479 args.log_screen, 489 args.log_screen,
480 log_file, 490 log_file,
481 tested_websites, 491 tested_websites,
482 args.tests) 492 args.tests)
483 493
484 saveResults(tests_results, save_path) 494 saveResults(tests_results, save_path)
OLDNEW
« 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