I'm trying to access an element within a subview and I'm finding it impossible to do so.
The hierarchy being:
View Controller:
- View
- tempView
- userEnterView
- zipCodeEntered
I want to access the zipCodeEntered text field. I have an accessibility label on it named "zipCodeEntered".
When I try and record the automation, it only register the superview "userEnterView" and not the actual text field which I can tap into.
I print "app.otherElements[SUPER_VIEW_NAME].debugDescription" to see what elements are in that hierarchy and it prints none.
Any ideas as to why I can not access these elements/how I can access them?
accessibilityIdentifer
instead? – BrodaccessibilityIdentifier
to the zipCodeEntered textField and it still can't find it. Using eitherapp.otherElements["zipCodeEntered"]
orapp.textFields["zipCodeEntered"]
. Added picture of storyboard layout – Falineapp.textFields["Zip Code"]
. – Brodapp.textfields["Zip Code"].exists
returns false. – Falineapp.textFields["Zip Code"].exists
shouldn't work. Let me know if that helps! – Berthoud