I'm looking for a way to test if an XCUIElement
is hidden in Swift 2 XCTestCase
UI Tests. It was not working on Xcode 7, so I updated to Xcode 7.1 and it still does not work.
I've tried referring to this post with no luck: Testing if an element is visible with XCode 7 UITest
I'm using a (static) table view with different controls inside cells, that sometimes get set to hidden, most importantly a few UILabels
. I have had no luck using hittable
to test if any of the controls are hidden or not. It seems to always return true, unless the control started off hidden (through storyboard, and was never updated), then it appears the control doesn't even exist… I'm guessing this has something to do with the way cells and their contentView's are generated and maybe it's buggy or not working, I'm not really sure.
Any help would be greatly appreciated.