Windows Settings, fail when trying to change default app settings for email

I’m trying to create a bot to let folks set their Windows default email settings with one click. I recorded my screen steps, but when it got to making a selection in the Windows Settings > Default App Settings > Email, it gave me this error when running. It feels like it needs another reference for the “Windows Settings” app, but I’m a totally newbie, so any help is greatly appreciated! Thanks in advance.

Source: Click ‘button Google Chrome’

Message: Cannot find the UI element corresponding to this selector:

Exception Type: UiPath.Core.SelectorNotFoundException

An ExceptionDetail, likely created by IncludeExceptionDetailInFaults=true, whose value is:
UiPath.Core.SelectorNotFoundException: Cannot find the UI element corresponding to this selector: ----> System.Runtime.InteropServices.COMException: Cannot find the UI element corresponding to this selector:
at UiPath.UiNodeClass.FindFirst(UiFindScope scope, String nodeID)
at UiPath.Core.UiElement.FindFirst(FindScope scope, Selector selector)
— End of inner ExceptionDetail stack trace —
at UiPath.Core.Activities.TaskAsyncCodeActivity`1.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)

You should validate the selector used for clicking the chrome icon in UiExplorer

1 Like

How do I do that? Also, here’s part of the error message that was cut off when I pasted in.

Message: Cannot find the UI element corresponding to this selector:

wnd omit:app=‘applicationframehost.exe’ omit:appid=‘windows.immersivecontrolpanel_cw5n1h2txyewy!’ title=‘Settings’ /><uia automationid=‘SystemSettings_DefaultApps_Email_Button’ cls=‘Button’ name=‘Email, Choose a default’

Open UiExplorer

Indicate element

Click on the button you want

It should tell you if its a valid selector or not

1 Like

Thanks for the really quick responses! I’ll try it!

This is great! I think I know why it’s erroring. It picks up the name of whatever is defaulted now as the setting button “name” value (assuming everyone using the bot has the same default). I think an IF statement might help here (IF default = A change this, Else = B skip).

Thanks again!

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.