I thought I’d take a look at a new browser-driving testing tool called Windmill.
Windmill is similar to Selenium, in that it drives the browser via a proxy. It has a test recorder, similar to Selenium IDE, but includes a DOM explorer and firebug-lite. It also has an interactive shell, so if you like running Watir via irb, you can do that. Friendlier than the Selenium interactive interface.
Windmill is written in Python and can be installed with easy_install. However, it doesn’t seem to work with Python 2.4 (it requires ctypes, which I believe was added in Python 2.5). I tried it with Python 2.6.2. It also requires pywin32.
It seems to have a cleaner architecture than Selenium, since you run it through the Windmill controller, though this is roughly analogous to instantiating a browser object in Selenium. However, I had some trouble getting it to work on windows.
Oddly enough, it seems to work with IE, but not with Firefox. When I try the example:
C:\Python\26\Scripts>windmill.exe firefox http://www.google.com
Traceback (most recent call last): File "C:\Python\26\Scripts\windmill-script.py", line 8, in <module> load_entry_point('windmill==1.2', 'console_scripts', 'windmill')() File "C:\Python\26\lib\site-packages\windmill-1.2-py2.6.egg\windmill\bin\windmill_bin.py", line 33, in main admin_lib.command_line_startup() File "C:\Python\26\lib\site-packages\windmill-1.2-py2.6.egg\windmill\bin\admin_lib.py", line 357, in command_line_startup shell_objects = setup() File "C:\Python\26\lib\site-packages\windmill-1.2-py2.6.egg\windmill\bin\admin_lib.py", line 179, in setup shell_objects_dict['browser'] = getattr(shell_objects, browser[0].lower())() File "C:\Python\26\lib\site-packages\windmill-1.2-py2.6.egg\windmill\bin\shell_objects.py", line 45, in start_firefox controller.start() File "build\bdist.win32\egg\mozrunner\runner.py", line 138, in start File "build\bdist.win32\egg\mozrunner\runner.py", line 62, in run_command File "C:\Python\26\lib\subprocess.py", line 595, in __init__errread, errwrite) File "build\bdist.win32\egg\mozrunner\killableprocess.py", line 158, in _execute_child pywintypes.error: (1, 'QueryInformationJobObject', 'Incorrect function.')
The browser spawns, but sometimes gives this message:
Proxy Server Refused Connection
The rest of the time, the windmill window also opens, but stalls with:
Reverting to JavaScript includes..
So, I’m going to give windmill a pass for now. It looks interesting, but Selenium works now. Maybe that’s just an argument for Java over Python (at least on Windows).