I am trying to close a SAP page. I used the “Close Application”, it can close the subpage, it worked fine. But when I tried to close the Logon page, the “close application” didn’t work, then I tried " Close the window" activity, actually, it could close the SAP logon page after a while, but it still reminded me as below, it confused me.
@Divyashreem Thanks for you response. I set the “ProcessName” as yours. But when I run the Kill process individually. It could work fine. But when I put it after other activities, it didn’t work as below. Thanks !
@Divyashreem Actually, It can close the SAP logon page, but very slowly and it will give me this error message, very strange.
Details as below:
18.3.1+Branch.master.Sha.4c05f670b311e90ee097c589605b399e9bee4874
Source: Kill Process
Message: Encountered errors while trying to kill a process
Exception Type: System.AggregateException
An ExceptionDetail, likely created by IncludeExceptionDetailInFaults=true, whose value is:
System.AggregateException: Encountered errors while trying to kill a process ----> System.ComponentModel.Win32Exception: 拒绝访问。
at System.Diagnostics.Process.Kill()
at UiPath.Core.Activities.KillProcess.Execute(CodeActivityContext context)
— End of inner ExceptionDetail stack trace —
at UiPath.Core.Activities.KillProcess.Execute(CodeActivityContext context)
at System.Activities.CodeActivity.InternalExecute(ActivityInstance instance, ActivityExecutor executor, BookmarkManager bookmarkManager)
at System.Activities.ActivityInstance.Execute(ActivityExecutor executor, BookmarkManager bookmarkManager)
at System.Activities.Runtime.ActivityExecutor.ExecuteActivityWorkItem.ExecuteBody(ActivityExecutor executor, BookmarkManager bookmarkManager, Location resultLocation)
remove your close application activity before kill process and make the last activity which you are using as completed instead of interactive and the use kill before kill give 5 sec delay.