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

Side by Side Diff: tools/site_compare/scrapers/firefox/firefox2.py

Issue 8678023: Fix python scripts in src/tools/ (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixes Created 9 years 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 | Annotate | Revision Log
OLDNEW
1 #!/usr/bin/python2.4 1 #!/usr/bin/env python
2 # Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. 2 # Copyright (c) 2011 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 """Does scraping for Firefox 2.0.""" 6 """Does scraping for Firefox 2.0."""
7 7
8 import pywintypes 8 import pywintypes
9 import time 9 import time
10 import types 10 import types
11 11
12 from drivers import keyboard 12 from drivers import keyboard
(...skipping 212 matching lines...) Expand 10 before | Expand all | Expand 10 after
225 if proc: 225 if proc:
226 count = 0 226 count = 0
227 while (len(windowing.FindChildWindows(0, "MozillaUIWindowClass")) 227 while (len(windowing.FindChildWindows(0, "MozillaUIWindowClass"))
228 and count < 5): 228 and count < 5):
229 keyboard.TypeString("[w]", True) 229 keyboard.TypeString("[w]", True)
230 time.sleep(1) 230 time.sleep(1)
231 count = count + 1 231 count = count + 1
232 return ret 232 return ret
233 233
234 234
235 if __name__ == "__main__": 235 def main():
236 # We're being invoked rather than imported, so run some tests 236 # We're being invoked rather than imported, so run some tests
237 path = r"c:\sitecompare\scrapes\Firefox\2.0.0.6" 237 path = r"c:\sitecompare\scrapes\Firefox\2.0.0.6"
238 windowing.PreparePath(path) 238 windowing.PreparePath(path)
239 239
240 # Scrape three sites and save the results 240 # Scrape three sites and save the results
241 Scrape( 241 Scrape(
242 ["http://www.microsoft.com", "http://www.google.com", 242 ["http://www.microsoft.com", "http://www.google.com",
243 "http://www.sun.com"], 243 "http://www.sun.com"],
244 path, (1024, 768), (0, 0)) 244 path, (1024, 768), (0, 0))
245 return 0
245 246
247
248 if __name__ == "__main__":
249 sys.exit(main())
OLDNEW
« no previous file with comments | « tools/site_compare/scrapers/firefox/__init__.py ('k') | tools/site_compare/scrapers/ie/__init__.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698