Check App State with strange Check visibility and Visibility check behaviour

Hello everybody reading this.

I’ve stumbled onto some strange behaviour concerning Check App State bordering on a bug.

I’m using:
Studio 2023.4.4
UIAutomation.Activities 23.10.9

In my project when creating a new Check App State by draging a descriptor to my sequence and selecting Check App State, there’s no Visibility check under Options in the properties (See below Screenshot 1)

However, the old Check App States that were in my project already, DO have this option under Options (See below Screenshot 2)

In both Check App States the exact same descriptor for Zaaknummer is used.
Both Check App States in Screenshot 1 and Screenshot 2 are in the same sequence.

  • My first question is, why is there no Check visibility option under Options when creating a new Check App State as opposed to the Check App States already in the project?

This wouldn’t bother me if both visibility checks worked exactly the same, but they don’t.

I’ve got this screen where Zaaknummer is in the background and Clustering is in the foreground. I want to check if Zaaknummer is visible:

In Screenshot 1 underneath Check App State there’s a Log Message that prints the Result of that Check App State. In this Check App State under Target, Visibility check is set to Fully visible.
The print of this Result is True. So Zaaknummer is found, even though it is in the background.

In Screenshot 2 underneath Check App State there’s a Log Message that prints the Result of that Check App State. In this Check App State under Target, Visibility check is set to None. And under Options, Check Visibility is set to True
The print of this Result is False. So Zaaknummer is not found.

Some more questions:

  • Why does Visibility check under Target behave different from Check visibility under Options?
  • If Check visibility under Options is not supported anymore (since it isn’t there when creating new Check App States) shouldn’t Visibility check under Target behave the same?
  • My preferred behaviour is that Zaaknummer is not found, because it is not in the foreground, but what is the way it was meant to be used?

Ultimately I want to use the Check App State in a Pickbranch in a Pick Activity so I can determine if the Clustering screen is on top (and click on Sluiten) or the screen with Zaaknummer but with the New Check App State from Screenshot 1 it’s random which screen it finds first. In the old Check App State from Screenshot 2 I do get the right result namely Clustering. However I don’t want to go around copying the old Check App State with the Visibility check under Options.

  • If the Visibility check is meant to find Zaaknummer because it is visible on screen, although it is in the back, what activity should I use to determine if Zaaknummer is on the foreground?

Thanx in advance for reading through the whole thing.
And even more thanx for answering (some of) my questions.

Greets,

RoboGuy

@RoboGuy

The selector you used is only <webctrl tag=‘P’ /> which has high chances to have more than one items…can you please try to change the selector to be more specific and then check

Cheers

Thanks for your reply Anil_G.

I agree with you that the strict selector is pretty broad but it’s the same in both Check App States so if it works in the old Check App State it should also work in the new one.

It gets even stranger yet because when I unlink the Check App States from the Object Repository and used the same broad Selector than the new Check App State (Screenshot 1) won’t find Zaaknummer, which is the behaviour I want.

Recap:
If new Check App State with Visibility check set to Fully visible uses:

  • Local selector: Zaaknummer is not found
  • Descriptor from Library Object Repository: Zaaknummer is found
  • Descriptor from local Object Repository: Zaaknummer is found
    In the above, the Selector and Descriptors are exactly the same.

Hello @RoboGuy ,

Starting with UIAutomation v22.4, the “Check visibility” property in the “Options” section of the Check App State activity has been removed because the new “Visibility check” option was added to the Target section.
For backwards compatibility, when opening a project with a previously added Check App State activity which had the “Check visibility” set to True, the “old” property is displayed as well. In all other cases the property is not displayed.

The “Visibility check” option under Target (with the values: None/Interactive/Fully Visible) should behave the same way as “Check visibility” under Options for values None/Fully Visible.
But you are right, there was an issue when the Check App State activity is linked to Object Repository. In that case, if you set the value of the “Visibility check” option in the Target section to None, the visibility of the UI element was still checked.

I tested with UIAutomation 24.10 and this problem seems to be solved. Please check version 24.10.2 and let us know if it works.

Best regards,
Luiza

Hello @Luiza_Surdu-Bob,

Thanx for your explanation.

I’ve tried to do the tests with UIAutomation 24.10.2 and stumbled into another problem.

With the descriptor in the Local Object Repository and the Local selector, I can still edit the Targeting method and the Visibility check (See below)
The image shows a software interface settings panel with various targeting options, highlighting the "Targeting methods" dropdown set to "Interactive (for Fuzzy Selection)." (Captioned by AI)

But using the descriptor in the Library Object Repository I cannot edit the Targeting method and Visibility check (See below)
image
Although Strict selector at Targeting methods is not greyed out, I can’t select another method.

Another thing I see is that the Visibility check that I set to Fully vissible is now set to None after upgrading to UIAutomation 24.10.2. This is not so good for compatibility when upgrading.

I would like your thoughts on this.

Greets,

RoboGuy

@RoboGuy

when using object repo the changes needs to be made in object repo only and not in the activity…you need to unlink before making changes here

cheers

Thanx Anil_G. The changes I try to make are all in the Library in the object repository.