On 9/26/06, Sun <[EMAIL PROTECTED]> wrote:
Regarding documentation, please see: http://en.wikipedia.org/wiki/Watir
Thank you for taking the time to do this. I do have a comment that i hope you won't take personally.
I find code like this to be rather embarrassing:
# To handle general popups, use WinClicker.I keep meaning to write a simpler way of doing this kind of thing, but then never really have the time to follow through. In my opinion, The code should actually look like this:
ie.button(:name, "btnG").click_no_wait # ensure popup won't block Watir
hwnd = ie.enabled_popup(5) # get a handle if one exists
if (hwnd) # yes there is a popup
w = WinClicker.new
w.makeWindowActive(hwnd)
w.clickWindowsButton_hwnd (hwnd, "Yes") # click the "Yes" button
end
ie.button(:name, "btnG").click_no_wait # ensure popup won't block WatirI did begin implementing an interface like this in watir once (see watir/dialog.rb and unittests/dialog_test.rb), but didn't finish. It used the Autoit library, which i also now think is not the best approach.
ie.dialog.button('OK').click
I would love to see someone finish this work. Clearly, this is a common problem for Watir users, but my view is that the problem is not a lack of documentation, but rather a hard-to-user interface. I would love to get this cleaned up for the full release of 1.5.
Bret
_______________________________________________ Wtr-general mailing list Wtr-general@rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general