| OLD | NEW |
| 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 | 9 |
| 10 from environment import Environment | 10 from environment import Environment |
| (...skipping 182 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 193 self.GoTo("https://login.yahoo.com") | 193 self.GoTo("https://login.yahoo.com") |
| 194 self.FillUsernameInto("#login-username") | 194 self.FillUsernameInto("#login-username") |
| 195 self.FillPasswordInto("#login-passwd") | 195 self.FillPasswordInto("#login-passwd") |
| 196 self.Click("#login-signin") | 196 self.Click("#login-signin") |
| 197 | 197 |
| 198 | 198 |
| 199 class Yandex(WebsiteTest): | 199 class Yandex(WebsiteTest): |
| 200 | 200 |
| 201 def Login(self): | 201 def Login(self): |
| 202 self.GoTo("https://mail.yandex.com") | 202 self.GoTo("https://mail.yandex.com") |
| 203 self.FillUsernameInto("#b-mail-domik-username11") | 203 self.FillUsernameInto("[name='login']") |
| 204 self.FillPasswordInto("#b-mail-domik-password11") | 204 self.FillPasswordInto("[name='passwd']") |
| 205 self.Click(".b-mail-button__button") | 205 self.Submit("[name='passwd']") |
| 206 | 206 |
| 207 | 207 |
| 208 # Fails due to test framework issue(?). | 208 # Fails due to test framework issue(?). |
| 209 class Aliexpress(WebsiteTest): | 209 class Aliexpress(WebsiteTest): |
| 210 | 210 |
| 211 def Login(self): | 211 def Login(self): |
| 212 self.GoTo("https://login.aliexpress.com/buyer.htm?return=http%3A%2F%2Fwww.al
iexpress.com%2F") | 212 self.GoTo("https://login.aliexpress.com/buyer.htm?return=http%3A%2F%2Fwww.al
iexpress.com%2F") |
| 213 self.WaitUntilDisplayed("iframe#alibaba-login-box") | 213 self.WaitUntilDisplayed("iframe#alibaba-login-box") |
| 214 frame = self.driver.find_element_by_css_selector("iframe#alibaba-login-box") | 214 frame = self.driver.find_element_by_css_selector("iframe#alibaba-login-box") |
| 215 self.driver.switch_to_frame(frame) | 215 self.driver.switch_to_frame(frame) |
| (...skipping 373 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 589 tests_results = RunTest( | 589 tests_results = RunTest( |
| 590 args.chrome_path, args.chromedriver_path, args.profile_path, | 590 args.chrome_path, args.chromedriver_path, args.profile_path, |
| 591 args.passwords_path, args.website, test_case) | 591 args.passwords_path, args.website, test_case) |
| 592 | 592 |
| 593 | 593 |
| 594 SaveResults(tests_results, save_path, | 594 SaveResults(tests_results, save_path, |
| 595 save_only_failures=args.save_only_failures) | 595 save_only_failures=args.save_only_failures) |
| 596 | 596 |
| 597 if __name__ == "__main__": | 597 if __name__ == "__main__": |
| 598 main() | 598 main() |
| OLD | NEW |