This is a quick post to show how to select an item from an android dropdown/spinner in Appium-Python.
I have a dropdown with a given id – ‘list_country_name’, and i would like to select a value ‘Australia’ from the dropdown values.
I’m following the below steps :
- Get element for the country dropdown/spinner via ‘find_element_by_id’
- Trigger click action on dropdown
- Get the item for ‘Australia’ via ‘find_element_by_android_uiautomator’
- Trigger click action on the item found for ‘Australia’
Here is the code for the entire flow. I have also abstracted out the logic as a separate Python function that all my other test cases can reuse.
That’s all for this post. Hope it’s helpful. Cheers
Checkout my portfolio here: https://confusedcoders.com/nikita-sharma-greenhorn-data-science-student
I am a greenhorn Data Science student with interest in finding patterns in data. My language of choice is Python and I am starting to get my hands dirty with R.
I blog on Medium.com  and ConfusedCoders.com . I share my code on Github.com .