xiaocong / uiautomator

Python wrapper of Android uiautomator test tool.
MIT License
2.03k stars 640 forks source link

How to set_text for edit field where there is no text or description #133

Open alpasanghavi opened 8 years ago

alpasanghavi commented 8 years ago

Hello,

I have an application and i need to enter email in the text field but the issue there is no text or description for this field, from UI AutomatorViewer i can only see the classname is set to android.view.View. Not sure how to set the text using your python wrapper. Appreciate your help.

Thanks, -Alpa.

xiaocong commented 8 years ago

@alpasanghavi If the application is written by your team, my suggestion is to ask developer to add a description to the view, else it's hard to maintain your test code. If not, please try d(className="android.view.View", instance=n) with the actual instance number of the view.