Question

I'm curious how it's able to get the ID's of UI elements in android activities and simulate different events? Is it the same story for iOS?

Was it helpful?

Solution 2

On iOS, an HTTP server is embedded in your app. That HTTP server hosts routes that can be used for querying the view hierarchy and the internal state of your app. The server also serves as a bridge between your app and the UIAutomation JavaScript API; this is how gestures are performed.

OTHER TIPS

Internally, calabash uses an instrumentation backend that runs on the phone. This backend is an Android app wrapper around Robotium, which is a test automation library for Android. A lot of the UI functionality of Robotium can be found here, and, by browsing the code, you can have an idea of how some UI events are generated.

Here is, for example, how swipes are generated: it is just a good use of MotionEvent, judiciously placed to simulate a swipe.

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