On Thu, Nov 13, 2008 at 10:58 AM, Bret Pettichord <[EMAIL PROTECTED]>wrote:
> > A number of people are running into a problem with Watir 1.6 that has a > simple solution. > > If you are getting an "Uninitialized Constant" error, please add > "require 'watir/ie'" to your script. > > Here is a long explanation for what is happening. > > With Watir 1.5 and prior "require 'watir'" loaded the Watir::IE class. > That changed with Watir 1.6. Now when you "require 'watir'" it only > loads the generic Watir::Browser class. To get the Watir::IE class, > someone has to load "watir/ie" which is the new name for the library > containing Watir::IE. This happens when the following occurs: > > 1. You make a reference to Watir::IE (which autoloads "watir/ie") > 2. You call Watir::Browser.new when configured to test with 'ie' > 3. You directly do 'require "watir/ie"' > > You have to do #3 if > > - You are monkey patching Watir::IE or one of its collaborating classes. > - You are using 'enabled_popup' (although this will be fixed in the next > release) > - You are doing something else tricky > > Bret Thanks Bret, I am trying to stay away from 'tricky' stuff but I am doing monkey patching. Here is an example of Watir duck punching http://www.bitbucket.org/marekj/watirloo/src/tip/lib/watirloo.rb gem 'watir', '=1.6.2' require 'watir' require 'watir/ie' -- marekj http://www.bitbucket.org/marekj/watirloo/ Watir Helper Framework --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Watir General" group. To post to this group, send email to [email protected] Before posting, please read the following guidelines: http://wiki.openqa.org/display/WTR/Support To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/watir-general -~----------~----~----~----~------~----~------~--~---
