06-29-2009, 11:57 PM
I have a website with an input button named Print. It opens a page which then fires off a Print dialog box via javascript using window.print();. My problem is I have not been able to automatically close it. Does anyone have any experience with this? My code is the following:
It says
I have a Wait command before it that waits for 2 seconds. I'll probably end up changing it to 5 to see if that helps.
Code:
Browser("title:=(.*)Print(.*)").Dialog("regexpwndtitle:=Print").WinButton("text:=Cancel").Click
It says
Quote:Cannot find the "[WinButton]" object's parent "[Dialog]" (class Dialog). Verify that parent properties match an object currently displayed in your application.
I have a Wait command before it that waits for 2 seconds. I'll probably end up changing it to 5 to see if that helps.