- sudo apt-get install python2.5
- wget http://peak.telecommunity.com/dist/ez_setup.py
- sudo python ez_setup.py
- sudo apt-get install python-setuptools
- sudo apt-get install python-dev
- sudo apt-get install python-openssl
- sudo easy_install windmill
- windmill shell firefox http://www.google.com
ERROR:
- [admin@localhost ~]$ windmill shell firefox
- Traceback (most recent call last):
- File "/usr/bin/windmill", line 9, in <module>
- load_entry_point('windmill==1.6', 'console_scripts', 'windmill')()
- File "/usr/lib/python2.7/site-packages/windmill-1.6-py2.7.egg/windmill/bin/windmill_bin.py", line 33, in main
- admin_lib.command_line_startup()
- File "/usr/lib/python2.7/site-packages/windmill-1.6-py2.7.egg/windmill/bin/admin_lib.py", line 351, in command_line_startup
- shell_objects = setup()
- File "/usr/lib/python2.7/site-packages/windmill-1.6-py2.7.egg/windmill/bin/admin_lib.py", line 182, in setup
- shell_objects_dict['browser'] = getattr(shell_objects, browser[0].lower())()
- File "/usr/lib/python2.7/site-packages/windmill-1.6-py2.7.egg/windmill/bin/shell_objects.py", line 45, in start_firefox
- controller = windmill.browser.get_firefox_controller()
- File "/usr/lib/python2.7/site-packages/windmill-1.6-py2.7.egg/windmill/browser/__init__.py", line 116, in get_firefox_controller
- controller = mozrunner.get_moz_from_settings(copy.copy(windmill.settings))
- File "/usr/lib/python2.7/site-packages/windmill-1.6-py2.7.egg/windmill/dep/_mozrunner/__init__.py", line 165, in get_moz_from_settings
- cmd_args=settings['MOZILLA_CMD_ARGS'])
- File "/usr/lib/python2.7/site-packages/windmill-1.6-py2.7.egg/windmill/dep/_mozrunner/__init__.py", line 131, in get_moz
- raise Exception ('No default or local profile has been set.')
- Exception: No default or local profile has been set.
解决方法:
在 ~/.windmill/prefs.py, 文件中增加下面2行:
- MOZILLA_BINARY='/usr/bin/firefox'
- MOZILLA_DEFAULT_PROFILE='~/.mozilla/firefox/'