Watir on Ruby 1.9.1

2 views
Skip to first unread message

Jari Bakken

unread,
Aug 5, 2009, 3:21:35 PM8/5/09
to watir-...@googlegroups.com
Hello,

I've made some progress getting Watir to run on Ruby 1.9.1 using the preview installer provided by the RubyInstaller guys (http://rubyinstaller.org/downloads/).

A recent benchmark comparing the various interpreters on Windows (http://antoniocangiano.com/2009/08/04/a-faster-ruby-on-windows-is-possible/) show some pretty incredible speedups using the mingw32 interpreters, with 1.9.1 being the fastest overall.

Here's the output from Watir's test suite on 1.9.1:



8 failures and 21 errors - that's not too bad! The errors are caused by some specific missing properties/methods on OLE objects, which is a bit strange since most of the tests are passing (which means the OLE stuff in general is working just fine on 1.9). I'm not very familiar with the Windows APIs/Win32OLE, so it would be great if someone with more experience in that field want to step up and take a look.

I've pushed my work so far to the ruby191 branch of my fork:


Some things to note if you want to experiment:

* The version of the user-choices gem (a Watir dependency) on RubyForge is not 1.9-compatible. This fork on GitHub fixes that issue:


To install:
  gem sources --add http://gems.github.com
  gem install qoobaa-user-choices s4t-utils xml-simple
  
* The modified Win32OLE library included with Watir (lib/watir/win32ole/wind32ole.c) doesn't work on 1.9. Since
the functionality it provides isn't critical for Watir to work, I've just made a quick workaround for now. This means that IE#modal_dialog won't work on 1.9 until someone looks at (a) the extension (which adds a connect_unknown function to the WIN32OLE class) and (b) the DL code in lib/watir/win32.rb.

Jari Bakken

unread,
Aug 5, 2009, 6:51:55 PM8/5/09
to watir-...@googlegroups.com
I figured out the WIN32OLE issue - all the tests are now passing on 1.9. 

Michael Hwee

unread,
Aug 6, 2009, 11:36:03 AM8/6/09
to watir-...@googlegroups.com
Good job, Jari.
Does it work with Watir 1.6.1 or 1.6.2?


From: Jari Bakken <jari....@gmail.com>
To: watir-...@googlegroups.com
Sent: Wednesday, August 5, 2009 3:51:55 PM
Subject: [wtr-general] Re: Watir on Ruby 1.9.1

Jari Bakken

unread,
Aug 6, 2009, 8:18:42 PM8/6/09
to watir-...@googlegroups.com
On Thu, Aug 6, 2009 at 5:36 PM, Michael Hwee <michae...@yahoo.com> wrote:
Good job, Jari.
Does it work with Watir 1.6.1 or 1.6.2?

Nope. At the moment you need my ruby191 branch from GitHub:


I'll make sure it get merged to master before the next release of Watir - if no one has any objections.
Would be great if someone else could try it out also - both the FireWatir and Watir tests should pass on 1.9.1 using this branch.

Bret: Any chance of getting watirbuild.com back up again?

Jari Bakken

unread,
Aug 9, 2009, 6:49:59 AM8/9/09
to watir-...@googlegroups.com
On Fri, Aug 7, 2009 at 2:18 AM, Jari Bakken<jari....@gmail.com> wrote:
> At the moment you need my ruby191 branch from GitHub:
> http://github.com/jarib/watir/tree/ruby191
> I'll make sure it get merged to master before the next release of Watir - if
> no one has any objections.

I've pushed the 1.9 fixes to Bret's master on GitHub and all tests are
passing for FireWatir and Watir on both 1.8.6 and 1.9.1.

Bret Pettichord

unread,
Aug 10, 2009, 10:56:06 AM8/10/09
to Watir General
On Aug 6, 7:18 pm, Jari Bakken <jari.bak...@gmail.com> wrote:
> Bret: Any chance of getting watirbuild.com back up again?

I'll see if i can get on this this week. Thanks for your work on the
1.9.1 support.

Michael Hwee

unread,
Aug 10, 2009, 11:16:09 AM8/10/09
to watir-...@googlegroups.com
This is so great, Jari.
Thanks for working on this.



----- Original Message ----
From: Jari Bakken <jari....@gmail.com>
To: watir-...@googlegroups.com
Sent: Sunday, August 9, 2009 3:49:59 AM
Subject: [wtr-general] Re: Watir on Ruby 1.9.1


karimnumerouno

unread,
Sep 16, 2009, 2:10:35 PM9/16/09
to Watir General
I did a similar thing with firewatir

for the user-choices gem, there lies a user-choices folder where in we
need to change the syntax within some of the files for every word
where there is a When with a colon e.g (When :) we need replace the
color with the word “then”

in ubuntu this is to be done for 3 files in the user-choices folder
’sources.rb”, ‘conversions.rb’,'arglist-stragergies.rb’

and it works like a charm.....

feels great again to be able to use this great tool at better
preformance

On Aug 10, 8:16 am, Michael Hwee <michael_h...@yahoo.com> wrote:
> This is so great, Jari.
> Thanks for working on this.
>
> ----- Original Message ----
> From: Jari Bakken <jari.bak...@gmail.com>
> To: watir-...@googlegroups.com
> Sent: Sunday, August 9, 2009 3:49:59 AM
> Subject: [wtr-general] Re: Watir on Ruby 1.9.1
>

karimnumerouno

unread,
Sep 16, 2009, 2:43:30 PM9/16/09
to Watir General
I did a similar thing with firewatir

for the user-choices gem, there lies a user-choices folder where in we
need to change the syntax within some of the files for every word
where there is a When with a colon e.g (When :) we need replace the
color with the word “ When then”
Reply all
Reply to author
Forward
0 new messages