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 def _GetCurrentLocation(action_runner): |
| 11 return action_runner.EvaluateJavaScript('document.location.href') |
| 12 |
| 13 |
| 14 def _WaitForLocationChange(action_runner, old_href): |
| 15 action_runner.WaitForJavaScriptCondition( |
| 16 'document.location.href != "%s"' % old_href) |
| 17 |
| 18 |
10 class Top25Page(page_module.Page): | 19 class Top25Page(page_module.Page): |
11 | 20 |
12 def __init__(self, url, page_set, name=''): | 21 def __init__(self, url, page_set, name=''): |
13 super(Top25Page, self).__init__(url=url, page_set=page_set, name=name) | 22 super(Top25Page, self).__init__(url=url, page_set=page_set, name=name) |
14 self.credentials_path = 'data/credentials.json' | 23 self.credentials_path = 'data/credentials.json' |
15 self.user_agent_type = 'desktop' | 24 self.user_agent_type = 'desktop' |
16 self.archive_data_file = 'data/top_25.json' | 25 self.archive_data_file = 'data/top_25.json' |
17 | 26 |
18 def RunSmoothness(self, action_runner): | 27 def RunSmoothness(self, action_runner): |
19 action_runner.RunAction(ScrollAction()) | 28 action_runner.RunAction(ScrollAction()) |
(...skipping 13 matching lines...) Expand all Loading... |
33 super(GoogleWebSearchPage, self).__init__( | 42 super(GoogleWebSearchPage, self).__init__( |
34 url='https://www.google.com/#hl=en&q=barack+obama', | 43 url='https://www.google.com/#hl=en&q=barack+obama', |
35 page_set=page_set) | 44 page_set=page_set) |
36 | 45 |
37 def RunNavigateSteps(self, action_runner): | 46 def RunNavigateSteps(self, action_runner): |
38 action_runner.NavigateToPage(self) | 47 action_runner.NavigateToPage(self) |
39 action_runner.WaitForElement(text='Next') | 48 action_runner.WaitForElement(text='Next') |
40 | 49 |
41 def RunStressMemory(self, action_runner): | 50 def RunStressMemory(self, action_runner): |
42 action_runner.RunAction(ScrollAction()) | 51 action_runner.RunAction(ScrollAction()) |
43 action_runner.RunAction(ClickElementAction( | 52 old_href = _GetCurrentLocation(action_runner) |
44 { | 53 action_runner.ClickElement(text='Next') |
45 'text' : 'Next', | 54 _WaitForLocationChange(action_runner, old_href) |
46 'wait_until': { | |
47 'condition': 'href_change' | |
48 } | |
49 })) | |
50 action_runner.WaitForElement(text='Next') | 55 action_runner.WaitForElement(text='Next') |
51 action_runner.RunAction(ScrollAction()) | 56 action_runner.RunAction(ScrollAction()) |
52 action_runner.RunAction(ClickElementAction( | 57 old_href = _GetCurrentLocation(action_runner) |
53 { | 58 action_runner.ClickElement(text='Next') |
54 'text' : 'Next', | 59 _WaitForLocationChange(action_runner, old_href) |
55 'wait_until': { | |
56 'condition': 'href_change' | |
57 } | |
58 })) | |
59 action_runner.WaitForElement(text='Next') | 60 action_runner.WaitForElement(text='Next') |
60 action_runner.RunAction(ScrollAction()) | 61 action_runner.RunAction(ScrollAction()) |
61 action_runner.RunAction(ClickElementAction( | 62 old_href = _GetCurrentLocation(action_runner) |
62 { | 63 action_runner.ClickElement(text='Next') |
63 'text' : 'Next', | 64 _WaitForLocationChange(action_runner, old_href) |
64 'wait_until': { | |
65 'condition': 'href_change' | |
66 } | |
67 })) | |
68 action_runner.WaitForElement(text='Previous') | 65 action_runner.WaitForElement(text='Previous') |
69 action_runner.RunAction(ScrollAction()) | 66 action_runner.RunAction(ScrollAction()) |
70 action_runner.RunAction(ClickElementAction( | 67 old_href = _GetCurrentLocation(action_runner) |
71 { | 68 action_runner.ClickElement(text='Previous') |
72 'text' : 'Previous', | 69 _WaitForLocationChange(action_runner, old_href) |
73 'wait_until': { | |
74 'condition': 'href_change' | |
75 } | |
76 })) | |
77 action_runner.WaitForElement(text='Previous') | 70 action_runner.WaitForElement(text='Previous') |
78 action_runner.RunAction(ScrollAction()) | 71 action_runner.RunAction(ScrollAction()) |
79 action_runner.RunAction(ClickElementAction( | 72 old_href = _GetCurrentLocation(action_runner) |
80 { | 73 action_runner.ClickElement(text='Previous') |
81 'text' : 'Previous', | 74 _WaitForLocationChange(action_runner, old_href) |
82 'wait_until': { | |
83 'condition': 'href_change' | |
84 } | |
85 })) | |
86 action_runner.WaitForElement(text='Previous') | 75 action_runner.WaitForElement(text='Previous') |
87 action_runner.RunAction(ScrollAction()) | 76 action_runner.RunAction(ScrollAction()) |
88 action_runner.RunAction(ClickElementAction( | 77 old_href = _GetCurrentLocation(action_runner) |
89 { | 78 action_runner.ClickElement(text='Previous') |
90 'text' : 'Previous', | 79 _WaitForLocationChange(action_runner, old_href) |
91 'wait_until': { | |
92 'condition': 'href_change' | |
93 } | |
94 })) | |
95 action_runner.WaitForElement(text='Images') | 80 action_runner.WaitForElement(text='Images') |
96 action_runner.RunAction(ScrollAction()) | 81 action_runner.RunAction(ScrollAction()) |
97 action_runner.RunAction(ClickElementAction( | 82 old_href = _GetCurrentLocation(action_runner) |
98 { | 83 action_runner.ClickElement(text='Images') |
99 'text' : 'Images', | 84 _WaitForLocationChange(action_runner, old_href) |
100 'wait_until': { | |
101 'condition': 'href_change' | |
102 } | |
103 })) | |
104 action_runner.WaitForElement(text='Images') | 85 action_runner.WaitForElement(text='Images') |
105 | 86 |
106 | 87 |
107 class GmailPage(Top25Page): | 88 class GmailPage(Top25Page): |
108 | 89 |
109 """ Why: productivity, top google properties """ | 90 """ Why: productivity, top google properties """ |
110 | 91 |
111 def __init__(self, page_set): | 92 def __init__(self, page_set): |
112 super(GmailPage, self).__init__( | 93 super(GmailPage, self).__init__( |
113 url='https://mail.google.com/mail/', | 94 url='https://mail.google.com/mail/', |
114 page_set=page_set) | 95 page_set=page_set) |
115 | 96 |
116 self.credentials = 'google' | 97 self.credentials = 'google' |
117 | 98 |
118 def RunNavigateSteps(self, action_runner): | 99 def RunNavigateSteps(self, action_runner): |
119 action_runner.NavigateToPage(self) | 100 action_runner.NavigateToPage(self) |
120 action_runner.WaitForJavaScriptCondition( | 101 action_runner.WaitForJavaScriptCondition( |
121 'window.gmonkey !== undefined &&' | 102 'window.gmonkey !== undefined &&' |
122 'document.getElementById("gb") !== null') | 103 'document.getElementById("gb") !== null') |
123 | 104 |
124 def RunStressMemory(self, action_runner): | 105 def RunStressMemory(self, action_runner): |
125 action_runner.RunAction(ClickElementAction( | 106 old_href = _GetCurrentLocation(action_runner) |
126 { | 107 action_runner.ClickElement( |
127 'wait_until': { | 108 'a[href="https://mail.google.com/mail/u/0/?shva=1#starred"]') |
128 'condition': 'href_change' | 109 _WaitForLocationChange(action_runner, old_href) |
129 }, | 110 old_href = _GetCurrentLocation(action_runner) |
130 'selector': 'a[href="https://mail.google.com/mail/u/0/?shva=1#starred"]' | 111 action_runner.ClickElement( |
131 })) | 112 'a[href="https://mail.google.com/mail/u/0/?shva=1#inbox"]') |
132 action_runner.RunAction(ClickElementAction( | 113 _WaitForLocationChange(action_runner, old_href) |
133 { | |
134 'wait_until': { | |
135 'condition': 'href_change' | |
136 }, | |
137 'selector': 'a[href="https://mail.google.com/mail/u/0/?shva=1#inbox"]' | |
138 })) | |
139 | 114 |
140 def RunSmoothness(self, action_runner): | 115 def RunSmoothness(self, action_runner): |
141 action_runner.RunAction(ScrollAction( | 116 action_runner.RunAction(ScrollAction( |
142 { | 117 { |
143 'scrollable_element_function': ''' | 118 'scrollable_element_function': ''' |
144 function(callback) { | 119 function(callback) { |
145 gmonkey.load('2.0', function(api) { | 120 gmonkey.load('2.0', function(api) { |
146 callback(api.getScrollableElement()); | 121 callback(api.getScrollableElement()); |
147 }); | 122 }); |
148 }''' | 123 }''' |
(...skipping 18 matching lines...) Expand all Loading... |
167 action_runner.ExecuteJavaScript(''' | 142 action_runner.ExecuteJavaScript(''' |
168 (function() { | 143 (function() { |
169 var elem = document.createElement('meta'); | 144 var elem = document.createElement('meta'); |
170 elem.name='viewport'; | 145 elem.name='viewport'; |
171 elem.content='initial-scale=1'; | 146 elem.content='initial-scale=1'; |
172 document.body.appendChild(elem); | 147 document.body.appendChild(elem); |
173 })();''') | 148 })();''') |
174 action_runner.Wait(1) | 149 action_runner.Wait(1) |
175 | 150 |
176 def RunStressMemory(self, action_runner): | 151 def RunStressMemory(self, action_runner): |
177 action_runner.RunAction(ClickElementAction( | 152 action_runner.ClickElement('div[class~="navForward"]') |
178 { | |
179 'selector': 'div[class~="navForward"]' | |
180 })) | |
181 action_runner.Wait(2) | 153 action_runner.Wait(2) |
182 action_runner.WaitForElement('div[class~="navForward"]') | 154 action_runner.WaitForElement('div[class~="navForward"]') |
183 action_runner.RunAction(ClickElementAction( | 155 action_runner.ClickElement('div[class~="navForward"]') |
184 { | |
185 'selector': 'div[class~="navForward"]' | |
186 })) | |
187 action_runner.Wait(2) | 156 action_runner.Wait(2) |
188 action_runner.WaitForElement('div[class~="navForward"]') | 157 action_runner.WaitForElement('div[class~="navForward"]') |
189 action_runner.RunAction(ClickElementAction( | 158 action_runner.ClickElement('div[class~="navForward"]') |
190 { | |
191 'selector': 'div[class~="navForward"]' | |
192 })) | |
193 action_runner.Wait(2) | 159 action_runner.Wait(2) |
194 action_runner.WaitForElement('div[class~="navForward"]') | 160 action_runner.WaitForElement('div[class~="navForward"]') |
195 action_runner.RunAction(ClickElementAction( | 161 action_runner.ClickElement('div[class~="navForward"]') |
196 { | |
197 'selector': 'div[class~="navForward"]' | |
198 })) | |
199 action_runner.Wait(2) | 162 action_runner.Wait(2) |
200 action_runner.WaitForElement('div[class~="navBack"]') | 163 action_runner.WaitForElement('div[class~="navBack"]') |
201 action_runner.RunAction(ClickElementAction( | 164 action_runner.ClickElement('div[class~="navBack"]') |
202 { | |
203 'selector': 'div[class~="navBack"]' | |
204 })) | |
205 action_runner.Wait(2) | 165 action_runner.Wait(2) |
206 action_runner.WaitForElement('div[class~="navBack"]') | 166 action_runner.WaitForElement('div[class~="navBack"]') |
207 action_runner.RunAction(ClickElementAction( | 167 action_runner.ClickElement('div[class~="navBack"]') |
208 { | |
209 'selector': 'div[class~="navBack"]' | |
210 })) | |
211 action_runner.Wait(2) | 168 action_runner.Wait(2) |
212 action_runner.WaitForElement('div[class~="navBack"]') | 169 action_runner.WaitForElement('div[class~="navBack"]') |
213 action_runner.RunAction(ClickElementAction( | 170 action_runner.ClickElement('div[class~="navBack"]') |
214 { | |
215 'selector': 'div[class~="navBack"]' | |
216 })) | |
217 action_runner.Wait(2) | 171 action_runner.Wait(2) |
218 action_runner.WaitForElement('div[class~="navBack"]') | 172 action_runner.WaitForElement('div[class~="navBack"]') |
219 action_runner.RunAction(ClickElementAction( | 173 action_runner.ClickElement('div[class~="navBack"]') |
220 { | |
221 'selector': 'div[class~="navBack"]' | |
222 })) | |
223 action_runner.Wait(2) | 174 action_runner.Wait(2) |
224 action_runner.WaitForElement('div[class~="navBack"]') | 175 action_runner.WaitForElement('div[class~="navBack"]') |
225 | 176 |
226 def RunSmoothness(self, action_runner): | 177 def RunSmoothness(self, action_runner): |
227 action_runner.RunAction(ScrollAction( | 178 action_runner.RunAction(ScrollAction( |
228 { | 179 { |
229 'scrollable_element_function': ''' | 180 'scrollable_element_function': ''' |
230 function(callback) { | 181 function(callback) { |
231 callback(document.getElementById('scrolltimedeventswk')); | 182 callback(document.getElementById('scrolltimedeventswk')); |
232 }''' | 183 }''' |
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
283 url='https://plus.google.com/110031535020051778989/posts', | 234 url='https://plus.google.com/110031535020051778989/posts', |
284 page_set=page_set) | 235 page_set=page_set) |
285 | 236 |
286 self.credentials = 'google' | 237 self.credentials = 'google' |
287 | 238 |
288 def RunNavigateSteps(self, action_runner): | 239 def RunNavigateSteps(self, action_runner): |
289 action_runner.NavigateToPage(self) | 240 action_runner.NavigateToPage(self) |
290 action_runner.WaitForElement(text='Home') | 241 action_runner.WaitForElement(text='Home') |
291 | 242 |
292 def RunStressMemory(self, action_runner): | 243 def RunStressMemory(self, action_runner): |
293 action_runner.RunAction(ClickElementAction( | 244 action_runner.ClickElement(text='Home') |
294 { | |
295 'text' : 'Home' | |
296 })) | |
297 action_runner.Wait(2) | 245 action_runner.Wait(2) |
298 action_runner.WaitForElement(text='Profile') | 246 action_runner.WaitForElement(text='Profile') |
299 action_runner.RunAction(ClickElementAction( | 247 action_runner.ClickElement(text='Profile') |
300 { | |
301 'text' : 'Profile' | |
302 })) | |
303 action_runner.Wait(2) | 248 action_runner.Wait(2) |
304 action_runner.WaitForElement(text='Explore') | 249 action_runner.WaitForElement(text='Explore') |
305 action_runner.RunAction(ClickElementAction( | 250 action_runner.ClickElement(text='Explore') |
306 { | |
307 'text' : 'Explore' | |
308 })) | |
309 action_runner.Wait(2) | 251 action_runner.Wait(2) |
310 action_runner.WaitForElement(text='Events') | 252 action_runner.WaitForElement(text='Events') |
311 action_runner.RunAction(ClickElementAction( | 253 action_runner.ClickElement(text='Events') |
312 { | |
313 'text' : 'Events' | |
314 })) | |
315 action_runner.Wait(2) | 254 action_runner.Wait(2) |
316 action_runner.WaitForElement(text='Communities') | 255 action_runner.WaitForElement(text='Communities') |
317 action_runner.RunAction(ClickElementAction( | 256 action_runner.ClickElement(text='Communities') |
318 { | |
319 'text' : 'Communities' | |
320 })) | |
321 action_runner.Wait(2) | 257 action_runner.Wait(2) |
322 action_runner.WaitForElement(text='Home') | 258 action_runner.WaitForElement(text='Home') |
323 | 259 |
324 def RunSmoothness(self, action_runner): | 260 def RunSmoothness(self, action_runner): |
325 action_runner.RunAction(ScrollAction( | 261 action_runner.RunAction(ScrollAction( |
326 { | 262 { |
327 "scroll_is_infinite": True | 263 "scroll_is_infinite": True |
328 })) | 264 })) |
329 | 265 |
330 | 266 |
(...skipping 22 matching lines...) Expand all Loading... |
353 super(BlogspotPage, self).__init__( | 289 super(BlogspotPage, self).__init__( |
354 url='http://googlewebmastercentral.blogspot.com/', | 290 url='http://googlewebmastercentral.blogspot.com/', |
355 page_set=page_set, | 291 page_set=page_set, |
356 name='Blogger') | 292 name='Blogger') |
357 | 293 |
358 def RunNavigateSteps(self, action_runner): | 294 def RunNavigateSteps(self, action_runner): |
359 action_runner.NavigateToPage(self) | 295 action_runner.NavigateToPage(self) |
360 action_runner.WaitForElement(text='accessibility') | 296 action_runner.WaitForElement(text='accessibility') |
361 | 297 |
362 def RunStressMemory(self, action_runner): | 298 def RunStressMemory(self, action_runner): |
363 action_runner.RunAction(ClickElementAction({'text' : 'accessibility'})) | 299 action_runner.ClickElement(text='accessibility') |
364 action_runner.WaitForNavigate() | 300 action_runner.WaitForNavigate() |
365 action_runner.RunAction(ScrollAction()) | 301 action_runner.RunAction(ScrollAction()) |
366 action_runner.RunAction(ClickElementAction({'text' : 'advanced'})) | 302 action_runner.ClickElement(text='advanced') |
367 action_runner.WaitForNavigate() | 303 action_runner.WaitForNavigate() |
368 action_runner.RunAction(ScrollAction()) | 304 action_runner.RunAction(ScrollAction()) |
369 action_runner.RunAction(ClickElementAction({'text' : 'beginner'})) | 305 action_runner.ClickElement(text='beginner') |
370 action_runner.WaitForNavigate() | 306 action_runner.WaitForNavigate() |
371 action_runner.RunAction(ScrollAction()) | 307 action_runner.RunAction(ScrollAction()) |
372 action_runner.RunAction(ClickElementAction({'text' : 'Home'})) | 308 action_runner.ClickElement(text='Home') |
373 action_runner.WaitForNavigate() | 309 action_runner.WaitForNavigate() |
374 | 310 |
375 | 311 |
376 class WordpressPage(Top25Page): | 312 class WordpressPage(Top25Page): |
377 | 313 |
378 """ Why: #18 (Alexa global), Picked an interesting post """ | 314 """ Why: #18 (Alexa global), Picked an interesting post """ |
379 | 315 |
380 def __init__(self, page_set): | 316 def __init__(self, page_set): |
381 super(WordpressPage, self).__init__( | 317 super(WordpressPage, self).__init__( |
382 # pylint: disable=C0301 | 318 # pylint: disable=C0301 |
383 url='http://en.blog.wordpress.com/2012/09/04/freshly-pressed-editors-picks
-for-august-2012/', | 319 url='http://en.blog.wordpress.com/2012/09/04/freshly-pressed-editors-picks
-for-august-2012/', |
384 page_set=page_set, | 320 page_set=page_set, |
385 name='Wordpress') | 321 name='Wordpress') |
386 | 322 |
387 def RunNavigateSteps(self, action_runner): | 323 def RunNavigateSteps(self, action_runner): |
388 action_runner.NavigateToPage(self) | 324 action_runner.NavigateToPage(self) |
389 action_runner.WaitForElement( | 325 action_runner.WaitForElement( |
390 # pylint: disable=C0301 | 326 # pylint: disable=C0301 |
391 'a[href="http://en.blog.wordpress.com/2012/08/30/new-themes-able-and-sig
ht/"]') | 327 'a[href="http://en.blog.wordpress.com/2012/08/30/new-themes-able-and-sig
ht/"]') |
392 | 328 |
393 def RunStressMemory(self, action_runner): | 329 def RunStressMemory(self, action_runner): |
394 action_runner.RunAction(ScrollAction()) | 330 action_runner.RunAction(ScrollAction()) |
395 action_runner.RunAction(ClickElementAction( | 331 action_runner.ClickElement( |
396 {'selector': | 332 # pylint: disable=C0301 |
397 # pylint: disable=C0301 | 333 'a[href="http://en.blog.wordpress.com/2012/08/30/new-themes-able-and-sig
ht/"]') |
398 'a[href="http://en.blog.wordpress.com/2012/08/30/new-themes-able-and-s
ight/"]' | |
399 })) | |
400 action_runner.WaitForNavigate() | 334 action_runner.WaitForNavigate() |
401 action_runner.RunAction(ScrollAction()) | 335 action_runner.RunAction(ScrollAction()) |
402 action_runner.RunAction(ClickElementAction({'text' : 'Features'})) | 336 action_runner.ClickElement(text='Features') |
403 action_runner.WaitForNavigate() | 337 action_runner.WaitForNavigate() |
404 action_runner.RunAction(ScrollAction()) | 338 action_runner.RunAction(ScrollAction()) |
405 action_runner.RunAction(ClickElementAction({'text' : 'News'})) | 339 action_runner.ClickElement(text='News') |
406 action_runner.WaitForNavigate() | 340 action_runner.WaitForNavigate() |
407 action_runner.RunAction(ScrollAction()) | 341 action_runner.RunAction(ScrollAction()) |
408 | 342 |
409 | 343 |
410 class FacebookPage(Top25Page): | 344 class FacebookPage(Top25Page): |
411 | 345 |
412 """ Why: top social,Public profile """ | 346 """ Why: top social,Public profile """ |
413 | 347 |
414 def __init__(self, page_set): | 348 def __init__(self, page_set): |
415 super(FacebookPage, self).__init__( | 349 super(FacebookPage, self).__init__( |
416 url='http://www.facebook.com/barackobama', | 350 url='http://www.facebook.com/barackobama', |
417 page_set=page_set, | 351 page_set=page_set, |
418 name='Facebook') | 352 name='Facebook') |
419 self.credentials = 'facebook' | 353 self.credentials = 'facebook' |
420 | 354 |
421 def RunNavigateSteps(self, action_runner): | 355 def RunNavigateSteps(self, action_runner): |
422 action_runner.NavigateToPage(self) | 356 action_runner.NavigateToPage(self) |
423 action_runner.WaitForElement(text='About') | 357 action_runner.WaitForElement(text='About') |
424 | 358 |
425 def RunStressMemory(self, action_runner): | 359 def RunStressMemory(self, action_runner): |
426 action_runner.RunAction(ClickElementAction({'text' : 'About'})) | 360 action_runner.ClickElement(text='About') |
427 action_runner.WaitForNavigate() | 361 action_runner.WaitForNavigate() |
428 action_runner.RunAction(ClickElementAction( | 362 action_runner.ClickElement(text='The Audacity of Hope') |
429 { | |
430 'text' : 'The Audacity of Hope', | |
431 })) | |
432 action_runner.WaitForNavigate() | 363 action_runner.WaitForNavigate() |
433 action_runner.RunAction(ClickElementAction( | 364 action_runner.ClickElement(text='Back to Barack Obama\'s Timeline') |
434 { | |
435 'text' : 'Back to Barack Obama\'s Timeline', | |
436 })) | |
437 action_runner.WaitForNavigate() | 365 action_runner.WaitForNavigate() |
438 action_runner.RunAction(ClickElementAction( | 366 action_runner.ClickElement(text='About') |
439 { | |
440 'text' : 'About', | |
441 })) | |
442 action_runner.WaitForNavigate() | 367 action_runner.WaitForNavigate() |
443 action_runner.RunAction(ClickElementAction( | 368 action_runner.ClickElement(text='Elected to U.S. Senate') |
444 { | |
445 'text' : 'Elected to U.S. Senate', | |
446 })) | |
447 action_runner.WaitForNavigate() | 369 action_runner.WaitForNavigate() |
448 action_runner.RunAction(ClickElementAction( | 370 action_runner.ClickElement(text='Home') |
449 { | |
450 'text' : 'Home', | |
451 })) | |
452 action_runner.WaitForNavigate() | 371 action_runner.WaitForNavigate() |
453 | 372 |
454 def RunSmoothness(self, action_runner): | 373 def RunSmoothness(self, action_runner): |
455 action_runner.RunAction(ScrollAction( | 374 action_runner.RunAction(ScrollAction( |
456 { | 375 { |
457 'scroll_is_infinite': True | 376 'scroll_is_infinite': True |
458 })) | 377 })) |
459 | 378 |
460 | 379 |
461 class LinkedinPage(Top25Page): | 380 class LinkedinPage(Top25Page): |
(...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
604 # Why: #1 Alexa reference | 523 # Why: #1 Alexa reference |
605 'http://answers.yahoo.com', | 524 'http://answers.yahoo.com', |
606 # Why: #1 Alexa sports | 525 # Why: #1 Alexa sports |
607 'http://sports.yahoo.com/', | 526 'http://sports.yahoo.com/', |
608 # Why: top tech blog | 527 # Why: top tech blog |
609 'http://techcrunch.com' | 528 'http://techcrunch.com' |
610 ] | 529 ] |
611 | 530 |
612 for url in other_urls: | 531 for url in other_urls: |
613 self.AddPage(Top25Page(url, self)) | 532 self.AddPage(Top25Page(url, self)) |
OLD | NEW |