[Help] Need explanation why the notepad robot demo does not work when there are few adjustment to txt file

Hello UiPath Community,

I’m new to this tool and there are many things that left me confused. I was doing a demo practice, opening a Notepad++ and typing in some text.

So everything worked normally at first, when the txt file was empty. However, when I have inputted some text before and played the robot again. The process is stuck and there is an error.

Can someone kindly explain to me why an empty txt file works while the nonempty file does not work?

Edit: Sorry for the post. I have already found out the problem. My text file was not saved after the first try, and the unsaved status remained even after I closed down Notepad++. This prevented the robot from making any further input. If I save the document and close it again, the robot works normally.

Did you save notepad++ after writing some text? When there are unsaved changes in a notepad++ file it adds an asterisk to the window title to make it *This week plan.txt - Notepad++. The robot cannot find this window because you are telling it to look for the title without the asterisk.

To get around this we can use wildcards to tell the robot to match anything that matches a pattern. The * character matches 0 or more characters and the ? character replaces a single character. If you change your selector to use title='*This week plan*' it will always match that file. If you do title='*Notepad++*' it will attach to any Notepad++ window that is open.

1 Like