Check App State can't be used to find just an application window

Doing some automation in Citrix, without the UiPath plugin. Every new window that appears is a new instance of wfica32.exe (the Citrix browser plugin).

I need to be able to use Check App State to see if a particular window appeared. All the windows are wfica32.exe but have different titles. When I use Check App State to get the selector for the window, it gets it but sets the Selector and Fuzzy Selector to blank. These empty selectors cause Check App State to find windows it shouldn’t. It seems like the Window Selector is also “fuzzy” because it’s finding windows where the title doesn’t actually match.

If I set Targeting Methods to None it gives me an error “Target is not valid because no targeting methods are enabled.” So what is the point of a None selection if None isn’t allowed?

In a nutshell, using Check App State to see if a particular window, not a UI element within the window, appeared is inconsistent.

I thought maybe setting the Use Application (that’s around the Check App State) to “single window” would help, but it doesn’t. Now there are NO selectors for the window I’m looking for, because the Window Selector only applies when it’s Application Instance instead of Single Window.

Hi @postwick,

I have the same issue with a different app. Please, did you find any solution to this?

When I need to check for a window I just use the classic Element Exists activity.

1 Like

Thank you, this is how I solved it as well.

I was interested if there is a way how to achieve this with the Check App State. If it is not possible, then I think that it should be mentioned in the documentation of the activity.

Almost 2 years and this still hasn’t been fixed. Any word from UiPath on why Check App State can’t be used on its own like Element Exists, and can’t be used to find a window itself?

1 Like

Hi @postwick ,

The Check App State activity can be used to verify if a particular window appeared either on its own or inside an application card:

  1. Use a standalone Check App State activity and indicate the entire window.
    The Window Selector is a wnd selector with a title attribute and the Selector and Fuzzy Selector are empty.
    This activity will correctly identify the window with that specific title. If another window is opened, with just a different title, that won’t match.

  1. Use the Check App State activity inside an Use Application/Browser card.
    For the App card you can use the checkbox “Match exact title: …” so that when the app doesn’t fully match the title, it will be considered “Target does not appear”.
    For the Check App State activity placed inside the Use Application/Browser you can also indicate the entire window and if you use the “Match exact title” option for the app card it will match the correct window.

You should get the same result as with the classic Element Exists activity.

Kind regards,
Luiza

I’m curious then, how it is considered an improvement that you need to use 3-4 activities in modern, to replace a well working single activity in classic to accomplish the same. Especially since a veteran like Paul has trouble with it.

I know Citrix on its own is an RPA challenge, lets nog get into that here now. But the modern activity sets get so many either incompatible, ill working or contradicting options and features that I really wonder what the philosophy behind it is.

None of that has ever worked for me, because Check App State doesn’t actually find the window with the strict/fuzzy selectors blank.

Hi @postwick ,

In your initial message you said that:

It is possible that in your test the Check App State activity was placed in a Use Application/Browser activity and the “Match exact title: …” checkbox was not checked.

Starting with version 21.2, we introduced the option to use the Check App State activity on its own, which can be used similarly to the classic Element Exists activity to indicate a window, with this difference regarding the selector:

  • For the modern Check App State activity you get a Window Selector together with a Strict selector and a Fuzzy selector (which are empty if you indicated a target window).

  • For the classic Element Exists activity you get the full selector in the Selector property, which contains only the <wnd app=… /> selector (the same as the Window selector in the Check App State activity).

The example from my previous message was to check if a specific Remote Desktop window is open, and it worked.

Could you please do a test with the standalone Check App State activity and let us know if it works?

Thank you,
Luiza

Yes it works standalone.

But the Element Exists can be used within the Use App/Browser and it will ignore that scope. Having to end the Use App/Browser, put the Check App State outside that scope, then have another Use App/Browser to reattach to the original window is messy.

You can put the Check App State inside the Use App/Browser, do the indicate, and the Check App State will have its own window selector. But that selector is apparently ignored. So many of these modern activities have window selectors that get ignored, so why have them? The window selector should be used if it’s there, and it should be blank if the parent scope is being used.

When you move the Check App State into the Use Application/Browser, this is what you get:

image

This makes no sense. The window selector should be used as part of the selector, period, just like it is for Element Exists.

Hi @postwick ,

Thank you for taking the time to test and share your feedback. We added your improvement suggestions to the backlog and will consider them for future releases.

Thank you,
Luiza

1 Like

Here is some more feedback on the “each activity has its own window selector” topic.

When a Use Application/Browser is set to use an input element instead of a selector, and I click “Edit target” for an activity inside it, I get this:

image

But the Click activity has the correct window selector so why doesn’t it use it?!

And to make matters worse, if I go to the Use Application/Browser, remove the variable from “Input element” and do an “indicate target” it fails to actually populate the selectors. So I have to add another Use Application/Browser, indicate in it, and copy all the activities to it from the broken one.

Also, this particular Use Application/Browser says “Input Application” but it’s not an application. I originally selected a browser window so it should be treating this as a browser, not an application. This is very frustrating. It used to work so much more cohesively.

An option to select “Browser/Chrome, Browser/Edge, Application, etc” when we are using an input element would be great.

The craziest part is if I put a Use Application/Browser around this Click activity, indicate the browser window, then click “Edit target” it correctly sees the outside container with the input element set, and allows me to indicate the Click inside it. So why can’t it do that correctly when it’s just inside the “Chrome: Browser_nCino” Use App/Browser?!

@postwick Thanks again for your feedback. We will consider adding some improvements here.

1 Like