Watir Bug on Cygwin: Diagnosis and Workaround

23 views
Skip to first unread message

Arco

unread,
Jan 29, 2009, 11:01:05 PM1/29/09
to Watir General
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 ...
win32.rb: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 (??)
- Cygwin support:
either fully commit to supporting cygwin, or not
I think it should be supported!!!
run regression tests on cygwin before every release

Bret Pettichord

unread,
Feb 1, 2009, 5:01:29 PM2/1/09
to watir-...@googlegroups.com
Thank you for figuring out how to get Watir working (again) with cygwin.
If you could put this in Jira, then we'll be sure to look at fixing this
in the next release.

Bret

Arco

unread,
Feb 1, 2009, 10:35:12 PM2/1/09
to Watir General
OK I filed an issue on the Jira tracker.


On Feb 1, 2:01 pm, Bret Pettichord <b...@pettichord.com> wrote:
> Thank you for figuring out how to get Watir working (again) with cygwin.
> If you could put this in Jira, then we'll be sure to look at fixing this
> in the next release.
>
> Bret
>
> Arco wrote:
> > 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. (seehttp://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.  (seehttp://pastie.org/374865)
>
> > Once this was done, another error occured - relating to modal
> > dialogs.  (seehttp://pastie.org/374865)
Reply all
Reply to author
Forward
0 new messages