# Open Application - Notepad Problem

**URL:** <https://forum.uipath.com/t/open-application-notepad-problem/22821>\
**Category:** Help\
**Tags:** selector, studio, uiautomation, activities\
**Created:** [February 15, 2018, 11:20am UTC](https://forum.uipath.com/t/open-application-notepad-problem/22821 "2018-02-15T11:20:28Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![femina](https://avatars.discourse-cdn.com/v4/letter/f/f6c823/32.png) [@femina](https://forum.uipath.com/u/femina)\
**Post date:** [February 15, 2018, 11:20am UTC](https://forum.uipath.com/t/open-application-notepad-problem/22821/1 "2018-02-15T11:20:28Z")

</div>

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..

---

<div class="post-metadata">

**Author:** ![Vinutha](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/vinutha/32/152013_2.png) [@Vinutha](https://forum.uipath.com/u/Vinutha)\
**Post date:** [February 15, 2018, 11:36am UTC](https://forum.uipath.com/t/open-application-notepad-problem/22821/2 "2018-02-15T11:36:23Z")

</div>

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’**

---

<div class="post-metadata">

**Author:** ![femina](https://avatars.discourse-cdn.com/v4/letter/f/f6c823/32.png) [@femina](https://forum.uipath.com/u/femina)\
**Post date:** [February 15, 2018, 11:53am UTC](https://forum.uipath.com/t/open-application-notepad-problem/22821/3 "2018-02-15T11:53:02Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![femina](https://avatars.discourse-cdn.com/v4/letter/f/f6c823/32.png) [@femina](https://forum.uipath.com/u/femina)\
**Post date:** [February 15, 2018, 11:54am UTC](https://forum.uipath.com/t/open-application-notepad-problem/22821/4 "2018-02-15T11:54:19Z")

</div>

Thank you so much for replying Vinutha…

My selector does have

So not able to detect what goes wrong…

Regards,

---

<div class="post-metadata">

**Author:** ![Vinutha](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/vinutha/32/152013_2.png) [@Vinutha](https://forum.uipath.com/u/Vinutha)\
**Post date:** [February 15, 2018, 12:01pm UTC](https://forum.uipath.com/t/open-application-notepad-problem/22821/5 "2018-02-15T12:01:09Z")

</div>

Can u post your selector value here ?

---

<div class="post-metadata">

**Author:** ![RafKorpo](https://avatars.discourse-cdn.com/v4/letter/r/a698b9/32.png) [@RafKorpo](https://forum.uipath.com/u/RafKorpo)\
**Post date:** [February 15, 2018, 12:04pm UTC](https://forum.uipath.com/t/open-application-notepad-problem/22821/6 "2018-02-15T12:04:52Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![arivu96](https://avatars.discourse-cdn.com/v4/letter/a/ebca7d/32.png) [@arivu96](https://forum.uipath.com/u/arivu96)\
**Post date:** [February 15, 2018, 12:05pm UTC](https://forum.uipath.com/t/open-application-notepad-problem/22821/7 "2018-02-15T12:05:00Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![femina](https://avatars.discourse-cdn.com/v4/letter/f/f6c823/32.png) [@femina](https://forum.uipath.com/u/femina)\
**Post date:** [February 15, 2018, 12:10pm UTC](https://forum.uipath.com/t/open-application-notepad-problem/22821/8 "2018-02-15T12:10:25Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![femina](https://avatars.discourse-cdn.com/v4/letter/f/f6c823/32.png) [@femina](https://forum.uipath.com/u/femina)\
**Post date:** [February 15, 2018, 12:15pm UTC](https://forum.uipath.com/t/open-application-notepad-problem/22821/9 "2018-02-15T12:15:25Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![VISHNU07](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/vishnu07/32/76766_2.png) [@VISHNU07](https://forum.uipath.com/u/VISHNU07)\
**Post date:** [February 16, 2018, 9:43am UTC](https://forum.uipath.com/t/open-application-notepad-problem/22821/10 "2018-02-16T09:43:36Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Rohit](https://avatars.discourse-cdn.com/v4/letter/r/41988e/32.png) [@Rohit](https://forum.uipath.com/u/Rohit)\
**Post date:** [February 27, 2018, 10:05am UTC](https://forum.uipath.com/t/open-application-notepad-problem/22821/11 "2018-02-27T10:05:08Z")

</div>

HI @femina ,

You need to supply selector for this activity and then populate Arguments property with full path of your file. 😀  
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.

---

<div class="post-metadata">

**Author:** ![femina](https://avatars.discourse-cdn.com/v4/letter/f/f6c823/32.png) [@femina](https://forum.uipath.com/u/femina)\
**Post date:** [February 28, 2018, 8:11am UTC](https://forum.uipath.com/t/open-application-notepad-problem/22821/12 "2018-02-28T08:11:54Z")

</div>

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… ☹

---

<div class="post-metadata">

**Author:** ![Prabu\_visu](https://avatars.discourse-cdn.com/v4/letter/p/779978/32.png) [@Prabu\_visu](https://forum.uipath.com/u/Prabu_visu)\
**Post date:** [April 1, 2018, 6:22pm UTC](https://forum.uipath.com/t/open-application-notepad-problem/22821/13 "2018-04-01T18:22:25Z")

</div>

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](https://global.discourse-cdn.com/uipath/original/2X/8/85ca9bda525f1475fbaee68771d617173ed766a4.xaml) (16.8 KB)

With Best Regards,  
V.Prabhu

---

<div class="post-metadata">

**Author:** ![Margotkho](https://avatars.discourse-cdn.com/v4/letter/m/76d3ee/32.png) [@Margotkho](https://forum.uipath.com/u/Margotkho)\
**Post date:** [April 4, 2018, 9:49am UTC](https://forum.uipath.com/t/open-application-notepad-problem/22821/14 "2018-04-04T09:49:31Z")

</div>

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!

---

<div class="post-metadata">

**Author:** ![Prabu\_visu](https://avatars.discourse-cdn.com/v4/letter/p/779978/32.png) [@Prabu\_visu](https://forum.uipath.com/u/Prabu_visu)\
**Post date:** [April 9, 2018, 5:48am UTC](https://forum.uipath.com/t/open-application-notepad-problem/22821/15 "2018-04-09T05:48:47Z")

</div>

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.

 ![SC-1](https://global.discourse-cdn.com/uipath/original/3X/4/e/4ef4e22c7c515a1599c855704b7f76bbaa309f2f.jpg) ![SC-2](https://global.discourse-cdn.com/uipath/original/3X/2/c/2ccc35c61c17ad7a5c58609bf8e19f259911ce5d.jpg)

With Best Regards,  
V.Prabhu

---

<div class="post-metadata">

**Author:** ![rakesh1](https://avatars.discourse-cdn.com/v4/letter/r/a183cd/32.png) [@rakesh1](https://forum.uipath.com/u/rakesh1)\
**Post date:** [April 24, 2018, 11:18am UTC](https://forum.uipath.com/t/open-application-notepad-problem/22821/16 "2018-04-24T11:18:11Z")

</div>

Hi femina,

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

Thank you,

---

<div class="post-metadata">

**Author:** ![RaviDevaraj](https://avatars.discourse-cdn.com/v4/letter/r/ad7895/32.png) [@RaviDevaraj](https://forum.uipath.com/u/RaviDevaraj)\
**Post date:** [May 23, 2018, 1:12pm UTC](https://forum.uipath.com/t/open-application-notepad-problem/22821/17 "2018-05-23T13:12:48Z")

</div>

> [@arivu96](#):
>
> **Selector**  
> `"<wnd app='notepad.exe' cls='Notepad' title='*' />"`

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

---

<div class="post-metadata">

**Author:** ![arivu96](https://avatars.discourse-cdn.com/v4/letter/a/ebca7d/32.png) [@arivu96](https://forum.uipath.com/u/arivu96)\
**Post date:** [May 23, 2018, 6:18pm UTC](https://forum.uipath.com/t/open-application-notepad-problem/22821/18 "2018-05-23T18:18:25Z")

</div>

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 🙂

---

<div class="post-metadata">

**Author:** ![RaviDevaraj](https://avatars.discourse-cdn.com/v4/letter/r/ad7895/32.png) [@RaviDevaraj](https://forum.uipath.com/u/RaviDevaraj)\
**Post date:** [May 23, 2018, 6:39pm UTC](https://forum.uipath.com/t/open-application-notepad-problem/22821/19 "2018-05-23T18:39:33Z")

</div>

Hi @arivu96

> [@arivu96](#):
>
> 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.

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

> [@arivu96](#):
>
> **File Name**  
> `"C:\windows\system32\notepad.exe"`

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]

---

<div class="post-metadata">

**Author:** ![jall.she](https://avatars.discourse-cdn.com/v4/letter/j/b782af/32.png) [@jall.she](https://forum.uipath.com/u/jall.she)\
**Post date:** [July 4, 2018, 6:49am UTC](https://forum.uipath.com/t/open-application-notepad-problem/22821/20 "2018-07-04T06:49:17Z")

</div>

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

[Next page](https://forum.uipath.com/t/open-application-notepad-problem/22821.md?page=2)
