I have a web form I’m trying to enter info into. There are multiple INPUTs. If any of the entries are invalid, alerts appear as SPANs under whichever field is wrong.
A general selector that will find any of these elements is:
<webctrl aria-role='alert' tag='SPAN' />
When I use Check App State and use that as the selector, it doesn’t find the element if more than one is visible on the screen (ie more than one field has an entry error). It seems to me it should return true if any element is found matching the selector, but it only works if there is exactly ONE.
You’re not understanding. It works fine if there is only one error on the page. But if there is more than one that match the selector it doesn’t detect any of them, it goes to the “does not appear” branch. All I’m looking for is “is there one or more errors” but it only works if it’s ONE.
If there is ONE object on the page that matches, it works. If there are no objects on the page that match, it works. If there are two or more, it doesn’t work. With two or more, it acts like there are none.
It’s inside a Use App/Browser so it inherits the top level scope. None of that is the issue. The selector is correct. The issue is that it works if there are none, works if there is one, but when there is more than one it acts as if there are none. And this is not expected behavior.
Yes we determined that this works. Fuzzy selector doesn’t work, regular selector does. Seems like both should work. Also, being able to explicitly define multiple selectors so Check App State can simultaneously look for multiple objects, would be great.