Skip to main content

Posts

Showing posts with the label instruments

Attempts to tap a UIButton in a UITableViewCell using UI Automation fail with "could not be tapped”

I have an iPhone app that I'm testing using UI Automation. I have a button in a UITableViewCell but when I try to tap on it using UI Automation I get the following error. Script threw an uncaught JavaScript error: target.frontMostApp().mainWindow().scrollViews()[0].elements()[element_name].tableViews()[0].elements().firstWithPredicate(name contains[c] 'Brooklyn').elements()["detailsButton"] could not be tapped I have enabled accessibility on the button in Interface Builder and assigned the accessibility label (and identifier) "detailsButton". I can retrieve the button element and have verified that it is valid. I just can't tap it for some reason. The UIButton is a round rectangular button with user interaction enabled. Thanks for any feedback.