Page tree
Skip to end of metadata
Go to start of metadata

Last updated: Jun 01, 2020 14:52

Problem

When using the object spy, sometimes when searching for an object this object is found, but not highlighted in the Screenshot.

Explanation

When using the objects tree on devices using UIAutomation (IOS10 and lower) - the Perfecto Object Spy will highlight objects by validation of 2 conditions.

(1) the object is a leaf in the objects tree and

(2) the object is "visible".

When taking objects tree using XCUTest (iOS10 and above) - the attribute 'visible' is not reliable, instead another attribute "hittable" is utilized.
So the object will be found when below conditions are true:

(1) the object is a leaf in the objects tree and

(2) the object is "hittable"

The "hittable" attribute can be affected by a number of factors, like other objects partially overlapping the object, which under XCUITest may cause the "hittable" will be false.