Can't get notepad to open from taskbar

Hi there

I am doing Lesson 5 Advanced UI interaction part 1.

Why is it that when I

  1. open notepad
  2. enter long text
  3. minimize
  4. open notepad again
  5. enter 2nd long text

do the above procedures, I am able to get the correct procedures repeated.

However, when I close my notepads and re-run the automation procedure, my program isn’t able to run from step 4 onwards… Can someone please help me? ASD.xaml (8.6 KB)

ASD has thrown an exception

Source: Click ‘push button’

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

Exception Type: SelectorNotFoundException

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 exception 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)**

Hello @Sahdique_Caubang
Make sure your selector for the click in step 4 is as follows:


It’s working fine for me!

Hi Rishabh,

Thanks for responding.

Do you mean to say that the file I attached appears to be working for you as is.

Or is it only working after having made adjustments to the selectors.

I have followed your advice and edited the attributes in my Click ‘push button’, unfortunately I am still not getting the robot to work.

I am wondering now if this could potentially be an issue with my machine and potentially some programs / unknown overlays that are giving me issues. But if it is indeed a local issue it does not explain why the robot is able to re-open notepad upon creation of the recording but fail to work after running a new instance of UiPath with the same saved file.

Thanks for your time.

ASD has thrown an exception

Source: Click ‘push button’

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

Exception Type: SelectorNotFoundException

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

I indicated the type into and clicks again on my machine!
And it worked!
Do you have the click selector exactly the same like i shows you?!

Try UiExplorer to modify the selector.Try using some different tags.

Hi Rishabh

After playing around with Indicate on Screen, after making adjustments. It seems to work. Thanks for your help.

Before you leave, can you please explain to me how making those adjustments helped to resolve the issue. I would like to keep this in mind the next time a similar problem occurs.

Thanks!

A lot of times Uipath fails to identify the elements correctly and uniquely.This was just the tip of the iceberg :slight_smile:
There’ll be situations when you’ll have to make your selector dynamic, so that it is still valid and working for various modifications.
The selector tag can be different for different machines too.You have to build a generic and reliable seletor so that it works in all sorts of environments.

What you did by modifying your selector helped Uipath studio to recognize the element better and hence managed to find it!
Whenever you get any issue regarding selector or element not found try tweaking the selector and making it as unique as possible! :slight_smile:

Cheers!
RIshabh

Thank you so much Rishabh,

You’ve been a big help. :smiley:

1 Like

You can thank me by marking it as a solution too :wink:
It was a pleasure helping you :slight_smile:

Happy automation!