cancel
Showing results for 
Search instead for 
Did you mean: 

How to spy / attach IE 11 Javascript pop-up window Alert / Confirm / Prompt

DukeAmes
Level 3
Hello Devs, I can't seem to spy / attach to a Javascript Confirm modal dialog window to press the OK button.  I've tried all three spy modes (I know the window is not HTML).  I've looked at the Browser Automation guide section 3.8, which is not clear and lacks an example; specifically on how to create an object that attaches to an existing window:   ========================================================= 3.8 Pop-up Windows Depending on how the web application has been built, you might need to create a separate business object to interface with a pop-up window. This will be the case if you see the €œA spying error has occurred€ error message. A new object will need to be configured to attach to a running instance of the popup, rather than launching something. Pop-up windows may need to be spied using Win32 or AA mode instead of the usual HTML mode. To speed up development, it might be best to build a separate generic object to handle IE pop-up  windows.  ========================================================= If you have successfully interacted with a Javascript popup, please share your detailed experience. Thanks! -Duke  
2 REPLIES 2

John__Carter
Staff
Staff
Try creating a new object that assumes IE is a Windows app. Then attach to IE and see if that object can see the pop up. If it does you're in business - create a page that 1) attaches 2) waits for the pop up 3) clicks OK 4) waits for the pop up to close. Then call this object from your original object.

Anonymous
Not applicable
I need this info too.  Trying to figure out how to make the object generic for handling all IE pop-ups.