Which function should I use to detect if a button on-screen is detectable or not with Object Spy?
TC Version: 14.0.317.7 x64
Android device on Android 7.1.1
I guess due to the way the app was written, a button that's on screen and visible (to human eyes), regardless whether or not another view/fragment is open. However, Object Spy can only detect that button if that other view is open (something about that view obscures an area of the screen and everything underneath it).
I'm trying to figure out how what function or call I can use to detect whether or not Object Spy would be able to pick it up (so I can code a condition that if ObjectSpy can't find it, then I need to open that other view before I can tap on that button). Visible and Exists always returns true, so they don't seem to be it.
Object Spy does not provide any additional API to control its 'sensitivity'. Object Spy either can identify an object or not.
You may consider two options:
a) Try to figure out a set of properties that will indicate that the second view is open and overlaps the button. So you will be able to determine whether or not the button can be tapped;
b) Use the Object Browser and try to identify the view and button when they are overlapped and, again, try to figure out the properties that will indicate that the view/button cannot be tapped.