I watched closely the robot execution while in debug mode and my guess is somehow system close is called twice(or more) and the first one executes successfully, the second one obviously can’t. The first red text in the output is "Attach Browser ‘iexplore.exe ACME’: Cannot find the UI element corresponding to this selector: " and it pops up when I step into System1Close workflow.
The problem arises because it seems that I can not have the browser up and running while the System1Close workflow is being executed. The selectors are like you suggested. There is a rather long list of workflows since everything is separated, Which workflows you want to take a look from the list? I cant add more than 1 picture as a new user, adding it on a separate reply.
This is the variable list that comes while debugging, the snippet i get the error(System1Close) has only 1 variables in it and it is type browser, I set it in attach browser and feed it into close tab. The attach browser has browserType set to IE.
I am also adding the exceptions thrown, I get the second exception 3 times before the crash;
RemoteException wrapping System.NullReferenceException: Object reference not set to an instance of an object.
at lambda_method(Closure ,
1.Execute(CodeActivityContext context) at System.Activities.CodeActivity1.InternalExecuteInResolutionContext(CodeActivityContext context)
at System.Activities.Runtime.ActivityExecutor.ExecuteInResolutionContext[T](ActivityInstance parentInstance,
1 expressionActivity) at System.Activities.InArgument1.TryPopulateValue(LocationEnvironment targetEnvironment,
at System.Activities.RuntimeArgument.TryPopulateValue(LocationEnvironment targetEnvironment,
at System.Activities.ActivityInstance.InternalTryPopulateArgumentValueOrScheduleExpression(RuntimeArgument argument,
2 argumentValueOverrides, Location resultLocation, Boolean isDynamicUpdate) at System.Activities.ActivityInstance.ResolveArguments(ActivityExecutor executor, IDictionary2 argumentValueOverrides,
at System.Activities.Runtime.ActivityExecutor.ExecuteActivityWorkItem.ExecuteBody(ActivityExecutor executor,
RemoteException wrapping UiPath.Core.SelectorNotFoundException: Cannot find the UI element corresponding to this selector: <html title='ACME System 1 - *' /> ---> RemoteException wrapping System.Runtime.InteropServices.COMException: Cannot find the UI element corresponding to this selector: <html title='ACME System 1 - *' />
at UiPath.UiBrowserClass.Find(String bstrSelector)
at UiPath.Core.Browser.Find(Selector selector,
— End of inner exception stack trace —
at UiPath.Core.Activities.ScopeActivity.EndExecute(NativeActivityContext context,
at UiPath.Core.Activities.AsyncNativeActivity.BookmarkResumptionCallback(NativeActivityContext context,
at System.Activities.Runtime.BookmarkCallbackWrapper.Invoke(NativeActivityContext context,
at System.Activities.Runtime.BookmarkWorkItem.Execute(ActivityExecutor executor,