enabled_popup is an IE specific method, so it's not defined in FireWatir. I'm not sure offhand if there's a specific way to query for dialogs, there likely is, I just haven't used it very much, maybe someone else can chime in. If you don't find anything, you can add a Jira ticket for the same.
-c On Thu, Apr 22, 2010 at 5:07 AM, Betsy <[email protected]> wrote: > Hi Charley, > > We have one more issue. This is with regard to handling popups with > Firewatir. > > #Requiring necessary Files > require 'watir' > require 'watir/contrib/enabled_popup' > > #Declaring the Browser Name to be Initiated - ie/firefox > #browsername = "ie" #For Internet Explorer > browsername = "firefox" #For Mozilla Firefox > puts "Browser Used => " + browsername.upcase > > #Setting the required Browser > Watir::Browser.default = browsername > > #Initiating the URL of a travel site > $b = Watir::Browser.start(url) > $b.maximize > > #Select Round Trip and fill-in the details > $b.radio(:name => "radtripType", :index => 1).set() > $b.select_list(:id => "selorigin").set(leavingFrom) > $b.select_list(:id => "seldestination").set(goingTo) > $b.text_field(:id => "txtdeptDateOway").value = departureDate > > #Search for Flights > $b.link(:text => "Search for Flights").click() > sleep(10) > > #Select a Flight > $b.image(:alt => "Departure Flight").click() > > #Continue Without Registering > sleep(10) > $b.image(:id => "buttonWOPayment").click_no_wait() > > #Start Thread to handle upcomign Popup > hwnd = $b.enabled_popup(50) > if (hwnd) #yeah! a popup > popup = WinClicker.new > popup.makeWindowActive(hwnd) > if browsername == "ie" > popup.clickWindowsButton("Microsoft Internet Explorer", "OK", 30) > else > popup.clickWindowsButton("The site at http://www.makemytrip.co.in > says: ", "OK", 30) > end > end > > On executing this code snippet we got the below error:- > xyz.rb:74: undefined method `enabled_popup' for #<FireWatir::Firefox: > 0x34d9484> (NoMethodError) > > Now is there a way to get the Pop up handler working for both watir > and firewatir with a single word change??? > > Thanks, > Betsy Joy. > > > On Apr 21, 7:32 pm, Charley Baker <[email protected]> wrote: > > You'll want to use one of these methods: > http://wiki.openqa.org/display/WTR/Browser.new > > > > <http://wiki.openqa.org/display/WTR/Browser.new>here are a few examples: > > > > http://watir.com/examples/ > > > > -c > > > > > > > > > > > > On Wed, Apr 21, 2010 at 3:24 AM, Betsy <[email protected]> wrote: > > > We recently upgraded from 1.6.2 version for watir/firewatir to 1.6.5 > > > version. > > > > > require 'firewatir' > > > ff = FireWatir::Firefox.new > > > ff.goto('www.google.com') > > > ff.text_field(:name,'q').set('name') > > > > > The above code got executed once successfully but ever since it has > > > been throwing up the below error:- > > > > > >ruby testff.rb > > > ./firewatir.rb:3: uninitialized constant FireWatir (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' > > > from testff.rb:2 > > > >Exit code: 1 > > > > > Can't seem to get to the reason. > > > > > Thanks in advance, > > > Betsy Joy. > > > > > -- > > > Before posting, please readhttp://watir.com/support. In short: search > > > before you ask, be nice. > > > > > You received this message because you are subscribed to > > >http://groups.google.com/group/watir-general > > > To post: [email protected] > > > > -- > > Before posting, please readhttp://watir.com/support. In short: search > before you ask, be nice. > > > > You received this message because you are subscribed tohttp:// > groups.google.com/group/watir-general > > To post: [email protected] > > -- > Before posting, please read http://watir.com/support. In short: search > before you ask, be nice. > > You received this message because you are subscribed to > http://groups.google.com/group/watir-general > To post: [email protected] > -- Before posting, please read http://watir.com/support. In short: search before you ask, be nice. You received this message because you are subscribed to http://groups.google.com/group/watir-general To post: [email protected]
