Howdy,

I had a little bit of trouble getting breakpoint to work, but was finally
successful.  The real interesting part is my print statements are now
working.  I think I will really like this troubleshooting approach.  Thanks
again!

I am in the process of migrating our testing framework over to Watir 1.5.
My script works flawlessly on Watir 1.4.1, but the script becomes suspended
on Watir 1.5.1.1145 after clicking on an image in a pop-up.

It appears to me that the attached window is not closing properly after the
last line of code is executed for the pop-up.

Any suggestions or opinions would be most welcome.

It is not obvious to me why this script does not work in Watir 1.5.1.

Here is the error I am getting by entering the next line of code in IRB.

ie2.image(:src , /ps_save_button.gif/).click
WIN32OLERuntimeError: Unknown property or method `document'
    HRESULT error code:0x80010108
      The object invoked has disconnected from its clients.
      from C:/apps/ruby/lib/ruby/gems/1.8/gems/watir-1.5.1.1145
/./watir.rb:1655:in `method_missing'
      from C:/apps/ruby/lib/ruby/gems/1.8/gems/watir-1.5.1.1145
/./watir.rb:1655:in `document'
      from C:/apps/ruby/lib/ruby/gems/1.8/gems/watir-1.5.1.1145
/./watir.rb:1146:in `each_element'
      from C:/apps/ruby/lib/ruby/gems/1.8/gems/watir-1.5.1.1145
/./watir.rb:1155:in `locate'
      from C:/apps/ruby/lib/ruby/gems/1.8/gems/watir-1.5.1.1145
/./watir.rb:1112:in `locate_tagged_element'
      from C:/apps/ruby/lib/ruby/gems/1.8/gems/watir-1.5.1.1145
/./watir.rb:3402:in `locate'
      from C:/apps/ruby/lib/ruby/gems/1.8/gems/watir-1.5.1.1145
/./watir.rb:2295:in `assert_exists'
      from C:/apps/ruby/lib/ruby/gems/1.8/gems/watir-1.5.1.1145
/./watir.rb:2526:in `enabled?'
      from C:/apps/ruby/lib/ruby/gems/1.8/gems/watir-1.5.1.1145
/./watir.rb:2301:in `assert_enabled'
      from C:/apps/ruby/lib/ruby/gems/1.8/gems/watir-1.5.1.1145
/./watir.rb:2471:in `click!'
      from C:/apps/ruby/lib/ruby/gems/1.8/gems/watir-1.5.1.1145
/./watir.rb:2457:in `click'

Here is all of the code relating to the pop-up:

            # Activates a drop down

            @ie.link(:text, "NEW...").click

            # Activates the Pop Up

            @ie.link(:text, "something").click

  #          sleep 10
            # Attachs to the pop-up window

            ie2 = IE.attach(:title, "something")

            wait = Waiter.new
            wait.wait_until{ie2.selectBox(:name, 'Type').exists?}

            ie2.selectBox( :name , "Type").select("thing 1")

            ie2.radio(:id, "do this").set
            ie2.text_field(:name, "add this").set("24")

            ie2.selectBox( :name , "locations").select("001-TX-AUS")

            ie2.image(:src , /ps_transferto_button.gif/).click

            # Clicking on image saves the selections
            # breakpoint
            ie2.image(:src , /ps_save_button.gif/).click

            # Assertions verifies the Pop Up closes and the application has
been updated with a new image

            assert(       @ie.image(:src , /ps_icon_local_loop.gif/
).exists?  )




Carl L. Shaulis
Convergys - Senior Analyst
512-634-0607



_______________________________________________
Wtr-general mailing list
Wtr-general@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general

Reply via email to