Search code examples
iosuitextfieldui-automationios-ui-automation

UIAutomaion tool doesn't see text fields


I've enabled "Accessibility" property for both TextFields that I have on my view and gave them accessibility labels like "LoginTextField" and "PasswordTextField". When I run logElementTree on mainWindow in UIAutomation script, I can see the text fields in the output, they have rect and value properties, but don't have name properties with labels assigned. And of course, mainWindow.textFields()["LoginTextField"] returns invalid object. What am I missing?


Solution

  • Try to set accessibility properties in code, not nib editor, see if that helps.