cancel
Showing results for 
Search instead for 
Did you mean: 

Which function should I use to detect if a button on-screen is detectable or not with Object Spy?

SOLVED
Highlighted
Occasional Contributor

Which function should I use to detect if a button on-screen is detectable or not with Object Spy?

Windows 10

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.

1 ACCEPTED SOLUTION

Accepted Solutions
Community Hero

Re: Which function should I use to detect if a button on-screen is detectable or not with Object Spy

Hi,

 

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.

 

Regards,
Alex
[Community Expert Group]
____
[Community Expert Group] members are not employed by SmartBear Software but
are just volunteers who have some experience with the tools by SmartBear Software
and a desire to help others. Postings made by [Community Expert Group] members
may differ from the official policies of SmartBear Software and should be treated
as the own private opinion of their authors and under no circumstances as an
official answer from SmartBear Software.
[Community Expert Group] signature is used with permission by SmartBear Software.
http://smartbear.com/forums/f83/t86934/community-experts/
================================

View solution in original post

1 REPLY 1
Community Hero

Re: Which function should I use to detect if a button on-screen is detectable or not with Object Spy

Hi,

 

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.

 

Regards,
Alex
[Community Expert Group]
____
[Community Expert Group] members are not employed by SmartBear Software but
are just volunteers who have some experience with the tools by SmartBear Software
and a desire to help others. Postings made by [Community Expert Group] members
may differ from the official policies of SmartBear Software and should be treated
as the own private opinion of their authors and under no circumstances as an
official answer from SmartBear Software.
[Community Expert Group] signature is used with permission by SmartBear Software.
http://smartbear.com/forums/f83/t86934/community-experts/
================================

View solution in original post