Selector fails for Notepad Find and Replace Feature in Windows 12 if Text changes

I am following the UiPath Associate Certification Training and it’s having me do find and replace in Notepad. I have found that Notepad keeps the text of the previous search. I have tried to update the selector to account for the text changing by going into the ‘Type Into’ Activity Properties and changing the ‘CV Text’ field to “*”, however I still get the error: “Could not find the user-interface (UI) element for this action.”

Note that I can work around the issue by having it clear out the search and replace boxes before closing the app so it ends up in the same state, however, that only works if I haven’t used the find feature myself and remembered to clear it manually before running the Process.

@Diana_Dinh-Andrus

Welcome to the community

please select the target method as strict selector and try changing the text in strict selector

cheers

I can change the selector to Strict Selector, but there is nowhere for me to change the text for the field. There are 3 attributes, app, appid and title. Even if I go into UI Explorer I cannot find the searchbox in the visual tree.

@Diana_Dinh-Andrus

Can you please show a screnshot

Cheers

Here you go, apparently I’m only allowed one image per post, going to try spreading them through multiple replies
Selecting Strict Selector
Screenshot 2023-06-26 115844-2

The Selector as it appears and list of taget options, notice that there is no option for intering a value for the strict selecteor.

UI Explorer tree

All of the elements under Notepad have this same list.
Screenshot 2023-06-26 120820-4

@Diana_Dinh-Andrus

Please uncheck cv and then indicate the required element in ui explorer and your concentration should be on left top and center top menus

cheers

Also I noticed that clearing out the find and replace fields does not work since notepad fills in the last search when a new file is opened even if I cleared them out first.

@Diana_Dinh-Andrus
Do you want to open notepad or do you want to open any existing file in notepad?

The demo video has me open a file manually, run the process, close that file, open another file manually, run the process, etc for 3 files. The point is to show me how to use a wildcard in the selector that allow me to run it on files with different names. This is kind of a moot point now anyway since the newest version has a checkbox that will allow that to happen and the classic view version can’t even select the find and replace popup in the Windows 12 Notepad.

Unchecking CV actually causes this error.

That’s not a selector for the Find/Replace prompt. That’s a selector for Notepad itself.

After sending the CTRL+H to Notepad to open the Find/Replace window, you need another Use Application/Browser activity to attach to the Find/Replace window which will have a selector like this:

<wnd app='notepad.exe' cls='#32770' title='Replace' />

OK, that’s not in the video, but maybe it’s because they’re using an older version.

Actually, using another Us Application/Browser isn’t letting me select the Find/Replace window at all. It just forces me to choose the entire Notepad window. Using the classic Attach Window activity has the same problem, which is why I’m not using it.

Sounds like you need to reboot your computer. The problem you’re seeing is typically solved by a reboot.

@Diana_Dinh-Andrus

You are getting that error because the strict selector you have is actually the wnd …window selector …it should be one level below it to be valid

Did you try opening ui explorer and indicate the required element?

Cheers

Was there ever a solution for this? I cannot use the Type Into activity to work in Windows 11 Notepad for Find and Replace boxes.