How do i fix the issues "Cannot bring the Target application in the foreground"

I used Type into for Modern design to enter Diagnosiscodes in MicroMdApplication. itshas been running attendedmode only not in unattended mode.i am getting below run time error.

Component details:

In this component , i used For each loop through the string of array values.
I have created Screen and stored in Object repository and i used that screen in Use application browser but i haven’t created element for enter diagnosiscodes because it did not have any sepecific uielement for those text fields, when i tried to select one field it has selected while top of the table so i just drag and drop the typeinto activity inside the use application browser and pass the array value with hotkeys.


Can anyone please let me know how do i fix this?

1 Like

Hi @divya.17290 - Does this activity in only failing in unattended mode. I guess the issue is not at Type Into activity. In the exception details, if you see the source it is showing as Src Changes but the name of your Type Into activity is just Type Into. So, if the exception occurs at Type Into activity it should show the source name as Type Into

So, the problem occurring while opening the application. Please check the below thread

Hi @divya.17290

Kindly make sure,

  1. Your bot is installed in Service mode for un-attended run
  2. Also make sure you log off the remote machine instead of disconnecting it

Hope this helps.


few doubts

it has been running before and failing now?

for individual field have you tried spying with UIA or AA?


I have been using community edittion and instaled as user mode only but remining my all projects have been running sucessfully in unattendedmode.I tried with diffrent type of Frame work UIA and AA as well but no luck.

In Typeinto property ,should i use check the activate property?
If i checked , i got Cannot bring the Target application in the foregroung error, if i not checked it didn’t enter any values just cursor stayed on the first text field.

Please advice.