Lisa,
I've encountered a smiliar problem. The issue is that IE has a class method
.attach but not an instance method (not needed in my opinion)
However FireWatir::Firefox.attach is only an instance method so you can only
attach to the browser if you have an existing reference.
If you are using IE then the solution is to keep using Watir::IE.attach how,
what for your needs (notice this may not run if you don't have admin
rigths).
Ultimately the goal is to make Browser class be the template that has
methods that specific browsers implement so if you do Browser.attach and
your browsder is IE it will delegate to IE.attach and if you have firefox it
will do Firefox.attach (which does not exist yet)
I'm learning this thing a bit and I made some ducktape experiments here with
tests
(older example)
http://gist.github.com/26693

and here (newer example) on watirloo codebase
http://www.bitbucket.org/marekj/watirloo/src/tip/lib/firewatir_ducktape.rb

I am now using Firefox.new :attach => true
option call to just attach to the previously started FF with jssh option in
it.
This is a hack and has to be understood before using it.

currently all watirloo tests will run on IE and Firefox (though some will
fail on FF - i need to fix them)
all the tests rely on class method attach for Firefox and for IE
This file will run all test for firefox with precondition that you have
started ff with jssh already and you have it open on the desktop
http://www.bitbucket.org/marekj/watirloo/src/tip/test/test_all_ff.rb

hope this helps a bit.



marekj | Semantic Page Objects Automation

Watir Framework
http://www.bitbucket.org/marekj/watirloo/





On Fri, Nov 28, 2008 at 4:58 PM, Lisa Crispin <[EMAIL PROTECTED]>wrote:

> Another question - on the development site you say:
> Watir 1.6.2 does not support Browser.attach. This will be supported in a
> future version.
> We use Browser.attach when we run our tests in a suite.
>
> What are we supposed to do instead, since Browser.attach isn't supported in
> 1.6.2? Or does this mean we can't use 1.6.2 at all? It seems weird that you
> couldn't run suites, there must be a way to do it that I just don't know
> about.
> Thanks,
> Lisa
>
>
> On Thu, Nov 13, 2008 at 11:06 AM, Bret Pettichord <[EMAIL PROTECTED]>wrote:
>
>>
>> i've added the require statement to the enabled popup script itself, so
>> this workaround will not be required with the next version of watir
>>
>> jpweston wrote:
>> > Thanks for this and your explanation in the "Uninitialzied Constant"
>> > post.
>> >
>> > j.
>> >
>> > On Nov 12, 9:17 pm, Bret Pettichord <[EMAIL PROTECTED]> wrote:
>> >
>> >> the solution is to add "require 'watir/ie'" to your script
>> >>
>> >> jpweston wrote:
>> >>
>> >>> After installing WATIR 1.6.2, scripts that have the following line:
>> >>> require 'watir/contrib/enabled_popup' are causing the following error:
>> >>>
>> >>> c:/ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/contrib/
>> >>> enabled_popup.rb:5: uninitialized constant Watir::PageContainer::Win32
>> >>> (NameError)
>> >>>    from
>> c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in
>> >>> `gem_original_require'
>> >>>    from
>> c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in
>> >>> `require'
>> >>>
>> >>> Here is what I have at the top of my scripts:
>> >>>
>> >>> require 'test/unit'
>> >>> require 'ci/reporter/rake/test_unit_loader.rb'
>> >>> require 'watir'
>> >>> require 'watir/testcase'
>> >>> require 'watir/contrib/enabled_popup'
>> >>>
>> >>> class TC_sales_tests < Watir::TestCase
>> >>>
>> >>>   include Watir
>> >>>
>> >>> <code>
>> >>>
>> >>> end
>> >>>
>> >>> Can someone point me toward what I am doing wrong here?  These scripts
>> >>> worked with the version of 1.5 that I had installed.
>> >>>
>> >>> Thanks.
>> >>>
>> >>> Johnathan
>> >>>
>> > >
>> >
>>
>>
>>
>>
>
>
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Watir General" group.
To post to this group, send email to watir-general@googlegroups.com
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to