Question

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 ?

Was it helpful?

Solution

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.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top