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.
@nimin
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.
VARIABLE LIST
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 ,
ActivityContext )
at Microsoft.VisualBasic.Activities.VisualBasicValue1.Execute(CodeActivityContext context) at System.Activities.CodeActivity
1.InternalExecuteInResolutionContext(CodeActivityContext context)
at System.Activities.Runtime.ActivityExecutor.ExecuteInResolutionContext[T](ActivityInstance parentInstance,
Activity1 expressionActivity) at System.Activities.InArgument
1.TryPopulateValue(LocationEnvironment targetEnvironment,
ActivityInstance activityInstance,
ActivityExecutor executor)
at System.Activities.RuntimeArgument.TryPopulateValue(LocationEnvironment targetEnvironment,
ActivityInstance targetActivityInstance,
ActivityExecutor executor,
Object argumentValueOverride,
Location resultLocation,
Boolean skipFastPath)
at System.Activities.ActivityInstance.InternalTryPopulateArgumentValueOrScheduleExpression(RuntimeArgument argument,
Int32 nextArgumentIndex,
ActivityExecutor executor,
IDictionary2 argumentValueOverrides, Location resultLocation, Boolean isDynamicUpdate) at System.Activities.ActivityInstance.ResolveArguments(ActivityExecutor executor, IDictionary
2 argumentValueOverrides,
Location resultLocation,
Int32 startIndex)
at System.Activities.Runtime.ActivityExecutor.ExecuteActivityWorkItem.ExecuteBody(ActivityExecutor executor,
BookmarkManager bookmarkManager,
Location resultLocation)
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,
IPlaceholderResolver placeholderResolver)
— End of inner exception stack trace —
at UiPath.Core.Activities.ScopeActivity.EndExecute(NativeActivityContext context,
IAsyncResult result)
at UiPath.Core.Activities.AsyncNativeActivity.BookmarkResumptionCallback(NativeActivityContext context,
Bookmark bookmark,
Object value)
at System.Activities.Runtime.BookmarkCallbackWrapper.Invoke(NativeActivityContext context,
Bookmark bookmark,
Object value)
at System.Activities.Runtime.BookmarkWorkItem.Execute(ActivityExecutor executor,
BookmarkManager bookmarkManager)