Has anyone else ever recieved the following exception when using UI Automation:
Cannot bring the target application in the foreground. The action was blocked by the current foreground window 'New notification' from the process 'shellexperiencehost.exe.'
The REF screensnap isn’t showing anything immediately related to a Windows notification on screen. This does not mean it was not there for a brief period of time just the screen snap did not capture anything resembling a Windows notification popup.
10 robots, thousands of jobs over the last 1.5 years and first time I have seen this exception.
We’re also seeing this on one of our unattended processes, it seems to be the first run every morning. The server is on an automated reboot schedule, so I don’t think it is related to that, but one of the screenshots we have shows a toast notification for pending Windows Updates. I’m not sure why this would cause this exception to be thrown however.
Transaction reference: N/A, Initialisation phase.
Exception: Cannot bring the target application in the foreground. The action was blocked by the current foreground window ‘New notification’ from the process ‘shellexperiencehost.exe.’
Source: [Main]
Hi
I got this error too.
EX. “message”:“Click ‘Save’: Cannot bring the target application in the foreground. The action was blocked by the current foreground window ‘New notification’ from the process ‘shellexperiencehost.exe.’”
So I try other activity(Click image in classic mode) but it’s not work.
“Exception :Click Image ‘iexplore.exe Report’= Cannot bring the target application in the foreground. The action was blocked by the current foreground window ‘New notification’ from the process ‘shellexperiencehost.exe.’”
This is solution I try but not work.
Setting delay before 10 sec in activity(Click). (It’s work 2-3 times and got error again.)
Setting delay before 5 sec in activity(Click Image). (Never success)
Setting delay before 40 sec in activity(Click). (Never success)
Next I’ll try
Setting delay before 40 sec in activity and time out 120 sec.
The last one that I suspecting.
I can run success in UiPath studio and batch which call xml file.
And this error isn’t happen all job.
So I got this message cause I was using one of my click input types of “Hardware” instead of “Simulate/Chrome API”
But, if you selected the “Hardware” input type by purpose you can change your resolution of the robot machine by going to the “Manage access” tab → clicking on the 3 dots on the production robot → Edit → moving to the third setting “Robot Settings” → under the “Session settings” set the “Login to Console” to True → Resolution Width = 1920 → Resolution Hight = 1080 → Click on Save → rerun your process.