I don't have the standard NavigationController nor a scrollView, TableView ....

Once the application finish launching and after the appDelegate, it goes to UIViewController object.

On the view of this viewController, I have UITextField. If I want to write to this text filed. Through UIAutomation JavaScript among many other options I have tried the following and still had no luck:

var name = "Test Text"; var textField = UIATarget.localTarget().frontMostApp().mainWindow().textFields()[0]; textField.setValue(name); after mainWindow() how do I be able to accesses or get a hold of my UIViewController ?

有帮助吗?

解决方案

To get the hierarchy of the user interface elements you can insert the command UIATarget.localTarget().logElementTree(); Studying the output of this command you will be able to guess the correct expression. In some cases you need to wait until every item is created (for example with UIATarget.localTarget().delay(1);) before logging.

An other oportunity to get the right answer is to record with Instuments as you fill this textfield (manualy) and check the generated code.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top