General:
There are 2 general ways to click on views using UI Automator:
- Using the text inside the textview (or subclass)
- Using the content-description of the view
How to find the content-description?
- Take an xml snapshot by using the Hierarchy viewer
Your use-case:
The content description of the + sign is language dependant:
- for english this is "New APN"
- for dutch this is "Nieuwe APN"
Code sample:
new UiObject(new UiSelector().className("android.widget.TextView").description("New APN")).click();