Thank you for your comment,
It is mentioned in apple's document that isHittable returns true if the element exists and can be clicked, tapped, or pressed at its current location (source) but in my case the button can not be clicked or tapped at its current location because if we tapped/clicked at the button's position it will not be tapped/clicked, is there any other way to tap/click on it which makes the sentence "can be clicked, tapped, or pressed at its current location" true ?
Post
Replies
Boosts
Views
Activity
I am not looking for a workaround to test the functionality of the button. I ma trying to understand how can isHittable return true for an element which the user the XCTest tap method can not tap on it which in my opinion doesn't match isHittable info mentioned in apple's document here: https://developer.apple.com/documentation/xctest/xcuielement/1500561-ishittable
how can the button "button1" in the code I shared is considered to be "can be clicked, tapped, or pressed at its current location" ?
it is clearly can not be clicked, tapped, or pressed at its current location, and based on that isHittable expected to return false but it returns true !