cancel
Showing results for 
Search instead for 
Did you mean: 

Unable to spy a pop-up

Anonymous
Not applicable
Hi, we're trying to spy a window popup in an internet based program to close it down and continue. When the popup "pops up", there is no way of spying it in Blue Prism. The only possible way is in accessibility mode, but that always brings the following error message after it says unable to spy: System.ApplicationException: The window spied was not found in the model at BluePrism.AMI.clsAMI.Spy(clsElementTypeInfo& elementType, List`1& identifiers) at Automate.frmIntegrationAssistant.HandleSpyOrLaunchClick(Object sender, EventArgs e) The popups seem to be contained within the program itself and don't open a new tab/window or process in task manager. Therefore, we're not able to attach to this popup itself (unless there's another way of doing this?} There is also no way to access any source code for the popup as it opens in front of the original program and right clicking/F12 dev tools is unavailable. At the minute a temporary fix is in place using surface automation but we'd rather not rely on this for when it is put into development. Anyone come across this type of problem before in their own programs or think of any ways to fix? Thanks all.
1 BEST ANSWER

Helpful Answers

John__Carter
Staff
Staff
Try un-maximising IE and sliding the pop-up paste the edge of the main window before you spy - sometimes this can enable the Win32 (red) spy mode to 'see' a pop-up. Failing that, it might be best to create a second object to handle the pop-up. IE can create multiple instances of iexplore.exe, and pop-ups tend to belong to the main window exe, whereas the web app itself will belong to another iexplore.exe. When you try to make BP use an element from another exe you can get errors.

View answer in original post

16 REPLIES 16

John__Carter
Staff
Staff
Try un-maximising IE and sliding the pop-up paste the edge of the main window before you spy - sometimes this can enable the Win32 (red) spy mode to 'see' a pop-up. Failing that, it might be best to create a second object to handle the pop-up. IE can create multiple instances of iexplore.exe, and pop-ups tend to belong to the main window exe, whereas the web app itself will belong to another iexplore.exe. When you try to make BP use an element from another exe you can get errors.

JamesBarrett
Level 4
I've successfully used the second method that John refers to, i.e. create a separate object for the pop-up. Seems to work perfectly fine

Anonymous
Not applicable
Hi James, we are also getting the same issue. but we are unable to capture this. Can you please tell me the second object of type windows application or web application? Please tell me the steps creating the second object to capture the popup? Do we need to create the second object as shared object for the existing object or all together as new windows object or web application object? Thanks in advance.

Anonymous
Not applicable
Hi James, Any update on this... Much Appritiated for the help. -Sri

John__Carter
Staff
Staff
Create the second object as separate from the first, and maybe call it IE Win32. In App Modeller choose the 'windows application' and 'attach' options, and treat IE as a thick client, not a web app.

Ravindersaini
Level 7
Hi All, You can use the same object. We need to attach to the pop up.so while attaching to the pop-up window pass the window title and child index as 1. Then you can spy it and perform required actions. I have attached the screenshot as well, Regards, Ravinder Singh

ShreyansNahar
Level 5
Hi, I tried creating the object, but it is not working. Can someone please explain a little more?

Anonymous
Not applicable
Hi All, I too tried creating the object. For that the first thing to be done is to spy the pop-up. But this is not happening with any mode ( Win32 mode, AA mode, Region Mode, HTML mode). It is throwing an error saying that ""Error during spy operation"". Can someone explain how to solve this problem?

BartWille
Level 3
A simple popup is best handled by a Code Stage. Get the handle of the popup based on something unique (eg. window text) Put it to forground Send a specific key combination to click it away --> Note: don't user TAB TAB TAB ENTER in order to click the button that you like. Either find the shortcut connected to this putton or get the handle of this button.