Check App State ALWAYS goes to 'Target does not appear'

Hi there,

In my current process, I’m using a Check App State to check if a block of text is visible. If it’s visible, I want my Check App State to go to the ‘‘Target appears’’ branch and log a message. However, for whatever reason, even if the target IS visible, it always goes to ‘‘Target does not appear’’. I copied this exact Check App State from one of my other processes that works in the exact same way with the exact same application, and there it works perfectly. However, in this process it just refuses to work properly. I’m using strict selectors only and I’ve tried all options under the ‘Wait for page load’ property. Nothing changes. The window selector also works.

I’ve checked the selectors, the package versions, I’ve changed my selectors, but nothing works… is this just a bug in UiPath?

Hi @Acerdins

May be it was not finding the proper selector.

Instead of check app state activity, give a try with Element exist activity the output is boolean variable. After Element exist activity insert If condition to check boolean value. If element exist it give True as output, If element doesn’t exist it give False.

Hope it helps!!

Hi @Acerdins,

Make sure that you are not using idx in your selector. Also, try to select your block of text using a different UI activity like ‘Get text’ to verify that in general Studio is able to find the element or use the ‘Find element’ activity, that will output the selector.

Juan P.

As I said, I’ve checked my selectors and they work properly. Since the Check App State works in my other process I’d rather figure out why this one doesn’t work instead of switchijng to an Element Exist activity right away.

I checked my selectors and they work, just like they work in the other process I have. I do not use an idx. I know that Studio is able to find the element since it does in the other process.

Okay @Acerdins

Try to run the bot in debug mode and use the highlight element to see if it is able to find the element.

If doesn’t find then re indicate the element when indicating check the strict selector and uncheck the fuzzy and image, Indicate the anchor in the popup which is stable and unique. In the Properties find the Wait for page load option select Complete option.

If the above also doesn’t works when indicating the element check the Strict selector and open the Ui explorer check for two to three times there is any change in the attribute, if any changes going on use wildcards.

Hope you understand!!

From what @Acerdins said, it looks like all selectors are good. You can always run the automation in debug mode to try to capture more information and logs from the process, may be be a logic issue or a bug.
If nothing works, try to update o re-install your UiAutomation Activities and restart studio.

Juan P.

Show us your selector and all your properties for the Check App State. Is the Check App State inside a Use Application/Browser?

These aren’t things that are going to cause Check App State not to identify an element. The selectors and other properties need to be addressed.




Hi there, thanks for your reply. Here are all the screenshots. Note that in the properties you’ll see the ‘‘Wait for page load’’ being used. I’ve had this off before, and also tried both options. Timeout has also been changed multiple times. This is also the exact selector with the exact properties that are in the other robot that works perfectly. I wonder if you can see something I don’t.

I’ve tried changing the selector by not using the id, but that doesn’t change anything. Tried multitple selectors, also doesn’t work.

Also to answer your other question, no, it’s not in a Use App/Browser, just like the other process where it works without. However, I’ve tested it WITH a Use App/Browser, but unfortunately that doesn’t work either.

Hi, thank you but I know how selectors work and I’ve done everything you said which unfortunately doesn’t work.

Try making your selector just <webctrl innertext='Purchase Requisitions' />

Hello @Acerdins,

I am Product Manager for UI Automation and I noticed that your issue is quite recent. Although I’ve encountered similar reports before, I was previously unable to replicate the problem. It would be extremely helpful if we could replicate this issue on our end; therefore, I need your assistance.

Could you please send me the .xaml file where this issue is occurring? Additionally, could you provide more details about:

  1. The application you are targeting—I see you mentioned SAP, but could you specify the version, and is it a GUI or Web-based application?
  2. The version of Studio you are using.
  3. The version of your UI Automation package.

Meanwhile, as a workaround, you can use the Classic Find Element activity for this step, (we allows integration with both Classic and Modern approaches). To do this, add the ‘Classic’ filter in the Activities panel, and you will gain access to those options as well.