Did you get this error resolved? You may need to do system updates at the command prompt gem update --system
On Sep 13, 11:30 am, Bob Loblaw <wccol...@gmail.com> wrote: > Hi guys > > I was just testing out some scenarios with modal_dialog and everything > was working perfectly so I copied it over to my main script and > everything failed. The error that came up was: > > C:/Ruby/lib/ruby/gems/1.8/gems/watir-2.0.2/lib/watir/modal_dialog.rb: > 32:in `locate': undefined method `connect_unknown' for WIN32OLE:Class > (NoMethodError) > from C:/Ruby/lib/ruby/gems/1.8/gems/watir-2.0.2/lib/watir/ > modal_dialog.rb:36:in `document' > from C:/Ruby/lib/ruby/gems/1.8/gems/watir-2.0.2/lib/watir/ > modal_dialog.rb:41:in `title' > from test.rb:18 > > When I removed the "require 'win32ole'" from my test, everything > worked again. > > Does anyone know why this is the case? > > Here is my simple test to show you what I mean. This code will attach > itself to an open page called "Assignment" and then click on a button > to load a new modal page > > This code works > ================================= > > require 'rubygems' > require 'watir' > > browser = Watir::IE.attach(:title, /Assignment/) > browser.image(:id, "new_initiativeid").click_no_wait > puts browser.modal_dialog(:title, "Look Up Records").exists? > puts browser.modal_dialog(:title, "Look Up Records").title > puts browser.modal_dialog(:title, "Look Up Records").url > browser.modal_dialog(:title, "Look Up Records").show_all_objects > > But this code does not work > ========================================= > require 'rubygems' > require 'watir' > require 'win32ole' > > browser = Watir::IE.attach(:title, /Assignment/) > browser.image(:id, "new_initiativeid").click_no_wait > puts browser.modal_dialog(:title, "Look Up Records").exists? > puts browser.modal_dialog(:title, "Look Up Records").title > puts browser.modal_dialog(:title, "Look Up Records").url > browser.modal_dialog(:title, "Look Up Records").show_all_objects > > I am using ruby 1.8.7 and WATIR 2.0.2 -- 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