I am trying to get started with Appium for testing my company's mobile applications. I wish to use the Python bindings to write the scripts, and I need to start with Android apps.
I have the Appium examples all working. I can run grunt android
and the tests work, and I can run the android.py
sample app.
But I'm a total newbie and I don't have a clear picture of how to identify the controls in my company's apps. I'm experienced with Python so I thought I would just build a list of control elements and introspect them.
I'm stuck! All of the methods like driver.find_elements_by_tag_name()
require a specific identifier (or at least I haven't found any wildcard that works).
How can I introspect the Appium tree of elements that represents the Android app under test? How can I enumerate all the elements so I can introspect them? Is there a tree I can walk to find all elements in the app?
I was hoping I could figure out the elements without needing to get the source code for the apps, build the apps in Eclipse, etc. but I can do this if necessary.
P.S. I would prefer to use Python, but would be open to using something else to do the introspection if that works better. I could still write the actual tests in Python, unless the other language was significantly better somehow.