> > What are you using attach for, since you consider it a deal breaker?

I too make heavy use of .attach() in Watir.  In fact, all of my tests
use it; of which there are hundreds.

While window switching does work, it doesn't work (for me) when using
test/unit; which I use extensively to run individual tests together
with setup and teardown.  For example; this won't work...

    require 'rubygems'
    require 'watir-webdriver'
    require 'test/unit'

    class Sampletest  < Test::Unit::TestCase

      def setup
        browser = Watir::Browser.new :ie
        browser.goto "www.google.com"
      end

      def test_01_do_stuff
        # Perform a google search here
      end

      def teardown
        browser.window(:title => "Google").use do
        browser.window(:title => "Google").close
        end
      end

    end


Watir's old method of 'browser = Watir::IE.attach(:title, "Google")'
would work perfectly in the teardown; but not in watir-webdriver, as
'browser' is not a defined variable.

I'm new to watir-webdriver, and do see that this is my route forward.
So Any pointers here will as always be appreciated.


GJHmf

-- 
Before posting, please read http://watir.com/support. In short: search before 
you ask, be nice.

watir-general@googlegroups.com
http://groups.google.com/group/watir-general
watir-general+unsubscr...@googlegroups.com

Reply via email to