cancel
Showing results for 
Search instead for 
Did you mean: 

Unable to match any windows with the query terms

SemVerhaar
Level 3

Hi all, I'm following the Blue Prism Foundation Training, and am tryin to understand the process of using business objects with Notepad. My process will open Notepad completely fine, but once it goes onto the Notepad: write step I get the following error message:

"Internal : Failed to perform step 1 in Write Stage 'Write Note' on page 'Write' - Unable to match any windows with the query terms"

I assume it is because Blue Prism isn't connected properly with that instance of Notepad, but I cannot figure out how to solve this. I started Blue Prism using the Training Setup Guide that loads in the Notepad Business Object for me, and I should be able to use it as is.

I would appreciate any help!

2 REPLIES 2

Vaibhav9878
Level 3

Hi,

I understood that you have placed some logic actions inside the Object that you used. Once you launched the notepad did you attached the notepad with process name inside the Navigate stage before using write stage.
It could help a bit better if you provide screenshot of the object page where you have got this error.

Correct me if I miss something..

Regards,

Vaibhav.

PvD_SE
Level 12

Hi Sem,

The way to use an object from your process is by the following object actions:

  • Launch the application
  • Attach to the launched application
  • Access the application UI

For the last point, accessing the UI, you'll need to identify, or spy, the individual elements within the UI. Once you've done that, they can be used within the object.

If you get the infamous exception 'Unable to match any windows with the query terms' then the spying or identifying the element you're trying to access has failed. This can either be a result of the element not having been identified completely and uniquely, or a parameter for identifying the element uniquely was not set correctly. Of course, if you want to access any element, the above mentioned first two steps must have been taken and successful. If you've spied an element in the Application Modeller, you can check it using the Highlight button. 

It seems unwise to have any business logic in your objects, that logic should be in the process while the object only is used for accessing the application. For more general use, refrain from doing more that one thing on an object page. So, if you need to navigate in your application, make an object page for each navigation step rather than putting all steps on one page. This way, each page can be reused in multiple processes rather than being restricted to only one step in one process.

Finally, it is a good habit to always start an object page with an attach action. Of course the attach page checks is the object is already attached and only attaches if it was not before.

Happy coding!
---------------
Paul
Sweden

Note:
In many cases, mine, folks cannot download attachments such as documents or, in your case, pictures. Perhaps you can paste them into your text next time.

Happy coding!
Paul, Sweden
(By all means, do not mark this as the best answer!)