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.
You can alloc the UIButton
except using round rect button. And also you can set target action of button in your controller class where table view delegate methods are presents.
Try asserting first if the button exists, use tuneup_js for easy assertions. Then assert if the button is enabled.
Have you tried:
target.frontMostApp().mainWindow().scrollViews()[0].elements()[element_name].tableViews()[0].**cells()**.firstWithPredicate("name contains[c] 'Brooklyn'").elements()["detailsButton"]
?
Also post another picture which shows the UIATableCell expanded where the detailsButton exists.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With