How does Calabash work internally?
-
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?
-
Answer:
The core facility for accessing UI elements and events can only be provided by the Android framework. This is the API class: http://developer.android.com/reference/android/test/ActivityInstrumentationTestCase2.html described in: http://developer.android.com/tools/testing/activity_testing.html Calabash runs an HTTP server inside the app that maps commands to this facility. The Ruby code exposed to the end user/tester talks to the HTTP server.
Miguel Paraz at Quora Visit the source
Other answers
http://anadea.info/blog/introduction-to-calabash Internally, calabash uses an instrumentation backend that runs on the phone. This backend is an Android app https://github.com/calabash/calabash-android/tree/master/ruby-gem/test-server/instrumentation-backend/src around http://code.google.com/p/robotium/, which is a test automation library for Android. A lot of the UI functionality of Robotium can be found https://github.com/jayway/robotium/tree/master/robotium-solo/src/main/java/com/jayway/android/robotium/solo, and, by browsing the code, you can have an idea of how some UI events are generated. Here is, for example, how https://github.com/jayway/robotium/blob/master/robotium-solo/src/main/java/com/jayway/android/robotium/solo/Swiper.java#L21: it is just a good use of http://developer.android.com/reference/android/view/MotionEvent.html, judiciously placed to simulate a swipe.
Owen Keat
Related Q & A:
- How Do You Work Out Your Tax And Insurance?Best solution by Yahoo! Answers
- Has anyone been prescribed phentermine? And how did it work for you?Best solution by answers.yahoo.com
- How many people work at NASA?Best solution by answers.yahoo.com
- How does Yahoo work?Best solution by Yahoo! Answers
- How does PayPal work and how much does it cost?Best solution by answers.yahoo.com
Just Added Q & A:
- How many active mobile subscribers are there in China?Best solution by Quora
- How to find the right vacation?Best solution by bookit.com
- How To Make Your Own Primer?Best solution by thekrazycouponlady.com
- How do you get the domain & range?Best solution by ChaCha
- How do you open pop up blockers?Best solution by Yahoo! Answers
For every problem there is a solution! Proved by Solucija.
-
Got an issue and looking for advice?
-
Ask Solucija to search every corner of the Web for help.
-
Get workable solutions and helpful tips in a moment.
Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.