On Cygwin, I ran into two separate problems that prevented Watir 1.6.2 from working.
First, the 'win32ole.so' file that ships with Watir appears to be incompatible with the version that is installed with my copy of Cygwin-
ruby. (see http://pastie.org/374756)
An error message 'bad file permissions' was generated when trying to run 'x = Watir::IE.new' from within IRB.
My workaround was to copy the 'ruby' version of win32ole.so into the 'watir' directories. (see http://pastie.org/374865)
Once this was done, another error occured - relating to modal dialogs. (see http://pastie.org/374865)
This was fixed by commenting out 2 lines in the Watir source code:
File - modal_dialog.rb Line - 65 GetUnknown.call ...
File - win32.rb Line - 6 GetUnknown = Win32API.new(...
Once these lines were commented out, watir worked.
Ideas for fixes:
- Fix the modal dialog issue with conditional execution:
GetUnknown.call (...) unless RUBY_PLATFORM == 'i386-cygwin'
GetUnknown=Win32APUI.new(... unless RUBY_PLATFORM =='i386-cygwin'
- Fix the win32ole issue by not bundling this file in the gem (Brett thinks maybe it is not needed??)
- Cygwin support: run regression tests on cygwin!!