Open Application - Notepad Problem

Hi All!!
I am starting to learn with RPA - Ui Path…
I have a runtime error – the notepad.exe not able to open when used in the Open Application Activity…
The exception is as follows –

Main has thrown an exception
Source: Open application ‘notepad.exe Untitled’
Message: Selector not found
Exception Type: COMException

Any one can help me to resolve this issue!!

Thanks in Advance…

1 Like

Check the selector of Open Application activity if it is right. The attribute app in the selector should be app=‘notepad.exe’. Looks like yours is app=‘notepad.exe Untitled’

Thank you so much for replying Vinutha…
My selector does have app=‘notepad.exe’
So not able to detect what goes wrong…
Regards,

1 Like

Thank you so much for replying Vinutha…

My selector does have

So not able to detect what goes wrong…

Regards,

Can u post your selector value here ?

1 Like

I’m still a newbe here so my guess could be off but have you tried changing selector to dynamic?

Hi @femina,
Use Open Application Activity
In properties.
File Name
"C:\windows\system32\notepad.exe"
Selector
"<wnd app='notepad.exe' cls='Notepad' title='*' />"

Regards,
Arivu

12 Likes

please find the selector path here…“”
and also my notepad.exe is located in C:\Windows\System32

one more info… even when i tried to indicate it on screen, it automatically displayed my FileName path as C:\Windows\system32\notepad.exe which is incorrect because my system has the path C:\Windows\System32\notepad.exe

1 Like

try “attack live element” inside the “open application activity” selector
property panel->target->selector select
inside you can find “attach live element” option

HI @femina ,

You need to supply selector for this activity and then populate Arguments property with full path of your file. :grinning:
You can open your application (for e.g. Notepad) by using Open Application activity. Follow the steps:

Drag Open Application activity.
Use Indicate window on screen and indicate on Notepad window.
Following properties gets populated automatically.
a. FileName - “C:\Window\system32\notepad.exe”
b. Selector - "<wnd app=‘notepad.exe’ cls=‘Notepad’ title=’* - Notepad’ " (Use wildcard * for matching any file’s name)
Now fill the Arguments property with the full path of your file. For e.g. “D:\MyFolder\MyNotepad.txt”
Run the automation.

5 Likes

Thanks Rohit…
I tried all the options… It is not working on that particular machine… But was able to execute the same on other machine… But whats the problem which prevented it to work is not known… :frowning:

Hey Famina,

I am also a newbie to UiPath, I have also faced the same problem as of you. I have resolved it.

Try to follow these steps in the Input Section of the Properties Window:

1.Create a text file on any location.(Here, I have created on Desktop) (Eg: NewTextDoc.txt)

2.Specify the location of the file as the value to the Arguments field.
(For Ex: Arguments = “C:\Users\Netcon-Prabhakaran.S\Desktop\NewTextDoc.txt”)

3.In the selector field change the value of the title element to the name of the text file you have created.(For Ex: Selector = "<wnd app=‘notepad.exe’ cls=‘Notepad’ title=‘NewTextDoc.txt - Notepad’ ")

4.FileName will be generated automatically so you no need to change that.

For your reference, I have attached the project file.Notepad.xaml (16.8 KB)

With Best Regards,
V.Prabhu

3 Likes

Hi everyone,

I have an additional question about this feature in UiPath. Whenever I use indicate window on screen to open an application UiPath cannot find the right path for this application. It always enters for the filename field “C:\Windows\explorer.exe” and the selector field: “”
I tried opening different apps with UiPath and for all of them, the input fields remain the same.

Does anybody know how I can change this?

Regards!

Hello Margotkho

Please check whether the application you are running, points to the correct path location using “Open file Location” option available when you right click the app.(Note: This usually happens if the app has been been wrongly located, Check the shortcut of the app).

Once the above scenario is fixed,you will the exact location of the .exe file of the app in the Filename field and Selector field will be automatically filled. Alter the title elements based on the arguments that are required for your app.

FYR, I have attached the screenshots.

With Best Regards,
V.Prabhu

3 Likes

Hi femina,

use open Application activity. In the input filename give the path of the .exe file.

Thank you,

Hi @arivu96
From were it is comes from
How did you get this
May i know that Please !!

1 Like

Hi @RaviDevaraj,

First open the notepad application then use open application activity in uipath select the selector.

In that selector I just modified title as * because any notepad can access.

Regards, Arivu :slight_smile:

Hi @arivu96

that’s ok but my question y we need to give that selector values there ? it’s that any specifically ?

in File name itself we gave the notepad to opening properties and in Argument we give the path were we need to create a file that too

Then y we need to give selectors [To know Deeply that selectors in this i am asking ]

hi @arivu96
I want to click the “Don’t Save” before closing the notepad .
what should I do?
thanks