But the automation works fine from studio on my desktop and when I run directly from studio on the Robot machine (the same machine the executes the automation when executed by Orchestrator). When I trigger via Orchestrator it always fails.
I assume you are using OCR activity GetOCRText. Check if robot resolution is correctly set in Orchestrator bot. Resolution mismatch affects the OCR activities.
That wouldn’t affect the activity’s ability to identify (with a selector) the element to OCR. That would just affect the accuracy of the OCR. Resolution affects element detection when you are using Image as the selector type, not when you’re using a regular selector in the Get OCR Text activity.
You aren’t “in Orchestrator” you’re on a robot server. What causes the UI element to appear? Are you doing something else, like a click and then it appears? You have to give us DETAILS about what your automation does, or we can’t help. Describe it in step by step detail.
I’ve added an additional activity “Check App State” to also check for the missing element, but this generates a new error…
Object reference not set to an instance of an object.
RemoteException wrapping System.NullReferenceException: Object reference not set to an instance of an object.
at Namespace_56a8.TC_FSCT_101_Expressions.TC_FSCT_101_Expressions_TypedDataContext3_ForReadOnly.__Expr14Get()
at Namespace_56a8.TC_FSCT_101_Expressions.TC_FSCT_101_Expressions_TypedDataContext3_ForReadOnly.ValueType___Expr14Get()
at Namespace_56a8.TC_FSCT_101_Expressions.InvokeExpression(Int32 expressionId, IList1 locations, ActivityContext activityContext) at System.Activities.Expressions.CompiledExpressionInvoker.InvokeExpression(ActivityContext activityContext) at Microsoft.VisualBasic.Activities.VisualBasicValue1.Execute(CodeActivityContext context)
at System.Activities.Runtime.ActivityExecutor.ExecuteInResolutionContext[T](ActivityInstance parentInstance, Activity1 expressionActivity) at System.Activities.InArgument1.TryPopulateValue(LocationEnvironment targetEnvironment, ActivityInstance activityInstance, ActivityExecutor executor)
at System.Activities.ActivityInstance.InternalTryPopulateArgumentValueOrScheduleExpression(RuntimeArgument argument, Int32 nextArgumentIndex, ActivityExecutor executor, IDictionary2 argumentValueOverrides, Location resultLocation, Boolean isDynamicUpdate) at System.Activities.ActivityInstance.ResolveArguments(ActivityExecutor executor, IDictionary2 argumentValueOverrides, Location resultLocation, Int32 startIndex)
at System.Activities.Runtime.ActivityExecutor.ExecuteActivityWorkItem.ExecuteBody(ActivityExecutor executor, BookmarkManager bookmarkManager, Location resultLocation)
— End of stack trace from previous location —
at UiPath.UIAutomationNext.Activities.NApplicationCard.OnFault(NativeActivityFaultContext faultContext, Exception propagatedException, ActivityInstance propagatedFrom)
at System.Activities.Runtime.FaultCallbackWrapper.Invoke(NativeActivityFaultContext faultContext, Exception propagatedException, ActivityInstance propagatedFrom)
at System.Activities.Runtime.FaultCallbackWrapper.FaultWorkItem.Execute(ActivityExecutor executor, BookmarkManager bookmarkManager)
My question is what is different about running the Test Case from UiPath Studio (my machine and the Robot machine) which is fine and running from Orchestrator and the element doesn’t appear.
The target application is created using Oracle Apex.
What is the “input mode” set to for that Click Save activity? With simulate and Chromium API, what can happen is UiPath thinks the click was performed and moves on, but the application did not respond to the click properly so the next activity fails.
Try setting it to hardware for input mode.
Also I’m not sure why you’re using Get OCR Text for the “changes saved” element. It’s a regular UI element, you don’t need to use OCR. Just use the regular Get Text.
Since you’re looking for a “changes saved” element I would assume there can be reasons the save fails. Are you accounting for that? Maybe something you entered is being rejected - are there errors on any of the fields, or is there an error dialog that appears? Usually in a process you have to check for both success and fail outcomes.
Also, if the save had failed it would return different text in the same UIElement.
Get Text ‘devecpvm009950’: Could not find the user-interface (UI) element for this action. Possible solutions: • Ensure application is opened and the UI element is visible on the screen at execution time • Edit the Target of the UI activity and use Validation to debug the issue. • If needed, re-indicate the element as its properties might have changed • Use “Check state” activity to check the application state before executing the action • Increase the “Delay before” value to allow time to the application to render entirely and become responsive
Would you be able to take this Changes saved confirmation from any other fields instead of relying on this single Ui Element? May be something like, if changes saved generally text boxes gets emptied if failed to save, text boxes retains their value.
I see you are trying hard on this so it’s not something common issue. Try finding workaround/alternate option also if anything possible.
But the selector would likely be a little different. Have you compared the selector for the success vs fail prompt? What you should do is use a Check App State to look for the success. If it doesn’t appear, look for the fail (with another Check App State inside the “does not appear” block of the first one).
Are you using Image as the selector type? That’s the only way resolution would cause the “could not find UI element” error. You shouldn’t be using Image. You should be using strict and/or fuzzy.