I’m using a find children activity and then a for each to evaluate and add some of them to a DataTable.
The evaluation has string manipulations and a few Get Attributes activity to fetch the page based on the actual element. As this for each seemed pretty simple I tried to go with the parallel for each but it throws this:
Catched error UiPath.Core.ElementOperationException: Error HRESULT E_FAIL has been returned from a call to a COM component. ---> System.Runtime.InteropServices.COMException: Error HRESULT E_FAIL has been returned from a call to a COM component. at UiPath.UiNodeClass.Get(String bstrAttr) at UiPath.Core.UiElement.Get(String attribute, Boolean refresh) --- End of inner exception stack trace --- at UiPath.Core.Activities.InvokeWorkflowFile.EndExecute(AsyncCodeActivityContext context, IAsyncResult result) at System.Activities.AsyncCodeActivity.System.Activities.IAsyncCodeActivity.FinishExecution(AsyncCodeActivityContext context, IAsyncResult result) at System.Activities.AsyncCodeActivity.CompleteAsyncCodeActivityData.CompleteAsyncCodeActivityWorkItem.Execute(ActivityExecutor executor, BookmarkManager bookmarkManager)
Does this mean that the Get Attribute activity can not be used inside a parallel for each loop?
What would be the workaround to save the page into a variable and process that as the Get Attribute activity but not using actually the live browser? If I’m guessing right that this is causing the exception.