I want to test my iOS app. It contains dynamically generated UI elemnts. I create all the UI elements programmatically without using the interface builder. To test I need to access them via Automation tool.
I can't at least print them with logElementTree() and I don't know how to access the dynamically generated elements.
If there is any way I can access dynamically generated elements using a script?
This is my code that tries to log the UI elements.
var target = UIATarget.localTarget();
var app = target.frontMostApp();
var window = app.mainWindow();
target.logElementTree();
I further tried using app.mainWindow().logElementTree(); it is also not working.
Any help will be highly appreciated.