Edge browser - cannot click any menu bar elements on server 2022 but click activity works on Windows 11

Using UIAutomation.Activities version 23.6.2-preview, when I attempt to click any menu bar options in Microsoft Edge (latest version as of 2023-09-11), the click activity always fails to find the Ui Element in either Attended or Unattended mode. When I use the Click activity for buttons and menu items on any web pages themselves, this functionality works successfully. I have attempted to use “Activate = true and Activate = false” without any difference in behaviour. I have also attempted to use “Hardware Event”, “Same as App/Browser” and “Windows Messages” without any difference in behaviour (All of these options work on Windows 11 but fail with the “could not find the user-interface (UI) element for this action” error.

This functionality works on my Windows 11 workstation in Studio (debug) or in Attended mode (via Ui Assistant) whereon I created the process.

I am currently working around this issue by using the “Go to URL” activity to activate the “edge://downloads/all” page and clicking the links in this page works on both Win 11 and Server 2022.

Hi @steve.meadows ,
can you share image about this error?
regards,

It is difficult to share an image of an absence of an action.

Studio: Community Ed: 2023.8.0

Relevant Package: UiPath.UiAutomation.Activities by UiPath v23.6.2-preview (but this has failed with earlier versions too)

Browser: Edge (latest version available)

I will attempt to provide a sequence of images of the steps that work on Win 11 and the logs showing the failures when attempted on Server 2022 (a VM used to run unattended processes).

The Shortcut (Ctrl + J) works to show the “Downloads” popup menu item but any attempts to click any element in the Downloads popup fails on Server 2022 in unattended and attended modes (even though these activities work correctly in debug (Studio) and attended mode on Windows 11)

This image shows the properties of the first “Click” activity:

The following steps outline the workaround I use (this approach works successfully on both Win11 and Server 2022).

Error Message (from Windows Server 2022)

Robot: robot-unattended

Account: robot

Hostname: RPA01DEV

Info: 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

UiPath.UIAutomationNext.Exceptions.NodeNotFoundException: 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 at UiPath.UIAutomationNext.Activities.TargetCommonLogic.GetSearchResultAsync(IRuntimeContext runtimeContext, ITargetAnchorable target, CancellationToken token)

at UiPath.UIAutomationNext.Activities.NClick.UiPath.UIAutomationNext.Activities.IVerifyExecutionActivity.ExecuteAsync(IRuntimeContext context, IActivityData data, CancellationToken cancellationToken)

at UiPath.UIAutomationNext.Activities.Services.VerifyExecutionService.ExecuteWithVerifyAsync[T](IVerifyExecutionActivity activity, IVerifyExecutionRuntimeContext verifyContext, IRuntimeContext context, T data, CancellationToken token)

at UiPath.UIAutomationNext.Activities.NClick.ExecuteAsync(IActivityContextWrapper context, CancellationToken cancellationToken)

at UiPath.UIAutomationNext.Activities.TargetBase.ExecuteAsync(AsyncCodeActivityContext context, CancellationToken cancellationToken)

at UiPath.Shared.Activities.AsyncTaskCodeActivityImplementation.EndExecute(AsyncCodeActivityContext context, IAsyncResult result)

at UiPath.Shared.Activities.AsyncTaskCodeActivity.EndExecute(AsyncCodeActivityContext context, IAsyncResult result)

at UiPath.Shared.Activities.ContinuableAsyncCodeActivity.EndExecute(AsyncCodeActivityContext context, IAsyncResult result)

at System.Activities.AsyncCodeActivity.CompleteAsyncCodeActivityData.CompleteAsyncCodeActivityWorkItem.Execute(ActivityExecutor executor, BookmarkManager bookmarkManager)

— 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)

— End of stack trace from previous location —

at UiPath.Executor.BaseRunner.EndExecute(IAsyncResult result)

at UiPath.Executor.InProcessRunner.EndExecute(IAsyncResult result)

at UiPath.Core.Activities.ExecutorInvokeActivity.EndExecute(AsyncCodeActivityContext context, IAsyncResult result)

at System.Activities.AsyncCodeActivity.CompleteAsyncCodeActivityData.CompleteAsyncCodeActivityWorkItem.Execute(ActivityExecutor executor, BookmarkManager bookmarkManager)

Was my explanation of the issue clear? Is there anything else you would like me to provide?