OLD | NEW |
1 # Copyright 2014 The Chromium Authors. All rights reserved. | 1 # Copyright 2014 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 # pylint: disable=W0401,W0614 | 4 # pylint: disable=W0401,W0614 |
5 from telemetry.page.actions.all_page_actions import * | 5 from telemetry.page.actions.all_page_actions import * |
6 from telemetry.page import page as page_module | 6 from telemetry.page import page as page_module |
7 from telemetry.page import page_set as page_set_module | 7 from telemetry.page import page_set as page_set_module |
8 | 8 |
9 | 9 |
10 class GmailAltThreadlistConversationPage( | 10 class GmailAltThreadlistConversationPage( |
11 page_module.Page): | 11 page_module.Page): |
12 | 12 |
13 """ Why: Alternate between Inbox and the first email conversation. """ | 13 """ Why: Alternate between Inbox and the first email conversation. """ |
14 | 14 |
15 def __init__(self, page_set): | 15 def __init__(self, page_set): |
16 super(GmailAltThreadlistConversationPage, self).__init__( | 16 super(GmailAltThreadlistConversationPage, self).__init__( |
17 url='https://mail.google.com/mail/', | 17 url='https://mail.google.com/mail/', |
18 page_set=page_set, | 18 page_set=page_set, |
19 name='gmail_alt_threadlist_conversation') | 19 name='gmail_alt_threadlist_conversation') |
20 self.credentials_path = 'data/credentials.json' | 20 self.credentials_path = 'data/credentials.json' |
21 self.user_agent_type = 'desktop' | 21 self.user_agent_type = 'desktop' |
22 self.archive_data_file = 'data/gmail_alt_threadlist_conversation.json' | 22 self.archive_data_file = 'data/gmail_alt_threadlist_conversation.json' |
23 self.credentials = 'google' | 23 self.credentials = 'google' |
24 | 24 |
25 def RunNavigateSteps(self, action_runner): | 25 def RunNavigateSteps(self, action_runner): |
26 action_runner.RunAction(NavigateAction()) | 26 action_runner.NavigateToPage(self) |
27 action_runner.RunAction(WaitAction( | 27 action_runner.RunAction(WaitAction( |
28 { | 28 { |
29 'javascript': | 29 'javascript': |
30 'window.gmonkey !== undefined && document.getElementById("gb") !== null' | 30 'window.gmonkey !== undefined && document.getElementById("gb") !== null' |
31 })) | 31 })) |
32 | 32 |
33 def RunEndure(self, action_runner): | 33 def RunEndure(self, action_runner): |
34 action_runner.RunAction(ClickElementAction( | 34 action_runner.RunAction(ClickElementAction( |
35 { | 35 { |
36 'xpath': '//span[@email]', | 36 'xpath': '//span[@email]', |
(...skipping 12 matching lines...) Expand all Loading... |
49 | 49 |
50 """ Chrome Endure test for GMail. """ | 50 """ Chrome Endure test for GMail. """ |
51 | 51 |
52 def __init__(self): | 52 def __init__(self): |
53 super(GmailAltThreadlistConversationPageSet, self).__init__( | 53 super(GmailAltThreadlistConversationPageSet, self).__init__( |
54 credentials_path='data/credentials.json', | 54 credentials_path='data/credentials.json', |
55 user_agent_type='desktop', | 55 user_agent_type='desktop', |
56 archive_data_file='data/gmail_alt_threadlist_conversation.json') | 56 archive_data_file='data/gmail_alt_threadlist_conversation.json') |
57 | 57 |
58 self.AddPage(GmailAltThreadlistConversationPage(self)) | 58 self.AddPage(GmailAltThreadlistConversationPage(self)) |
OLD | NEW |