Hi,

The application I'm testing uses lots of modal Javascript alerts with
'OK' and 'Cancel' buttons. I'm using WinClicker to handle them and it
works very nicely until you get to the 11th pop-up, at which point it
throws the error: "DL::DLError: too many callbacks are defined." Watir
version is 1.5.1.1119 and IE version is 7. Details are below. I'd be
grateful for any thoughts.

Here's a test that consistently produces the error. It always works
perfectly for the first 10 instances and then fails on the 11th
instance...

    def test001
        1.upto 20 do |i|
          puts i.to_s
          # add an object
          $ie.button(:id, "addrow").click
          # delete the object
          $ie.button(:id, "deleterow").click_no_wait # this throws up
a Javascript alert
          # click OK on the pop-up
          hwnd = $ie.enabled_popup(5)           # get a handle if one exists
            if (hwnd)
            w = WinClicker.new
            w.makeWindowActive(hwnd)
            w.clickWindowsButton_hwnd(hwnd, "OK")
            end
          $ie.wait
        end
    end

Here's the output...

Started
1
2
3
4
5
6
7
8
9
10
11
E
Finished in 38.226 seconds.

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

Reply via email to