I am trying to run the below script but getting an error. Can anyone
help me on this? I want to bypass the javascript popup. Thanks in
advance.
The script below:
require 'watir'
include 'watir'
#require 'watir/contrib/enabled_popup'
require 'test/unit'
class TC_recorded < Test::Unit::TestCase
        def test_recorded
                ie = Watir::IE.new
        ie.goto('http://www.irctc.co.in/')
        ie.text_field(:name, 'userName').set('aamittt')
        ie.button(:id, 'Button1').click
  hwnd = browser.enabled_popup(5)
if (hwnd)  #yeah! a popup
  popup = WinClicker.new
  popup.makeWindowActive(hwnd)
  popup.clickWindowsButton("Windows Internet Explorer", "OK", "30")
end
        end
end


Iam getting following error:
1) Error:
test_recorded(TC_recorded):
NameError: undefined local variable or method `browser' for
#<TC_recorded:0x2c7d3e4>
    exam1.rb:10:in `test_recorded'

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Watir General" group.
To post to this group, send email to [email protected]
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