Print dialog box.

39 views
Skip to first unread message

Vidya

unread,
Dec 14, 2008, 6:45:02 AM12/14/08
to Watir General
Can anyone guide me to automate the print dialog box window

dku...@olenick.com

unread,
Dec 15, 2008, 12:44:32 PM12/15/08
to Watir General
This works for me (I just have to print or cancel. If you need to do
other stuff like select printer, I can't help too much with that).

# Print dialog opens
hwnd = ie.enabled_popup
w = WinClicker.new
if Cancelling
w.clickWindowsButton_hwnd(hwnd, "Cancel")
else
w.clickWindowsButton_hwnd(hwnd, "&Print")
end

Notice the difference between the names of the cancel and print
button. That seems to be important. If you try to click button "Print"
it doesn't work.

ddk
Reply all
Reply to author
Forward
0 new messages