I am using Appium via Robot Framework. I am able to use click element and perform actions. But when it comes to selecting a value from drop down, there is no inbuilt command from appium.
My example: I am trying on redbus mobile app. I have a calendar, where I need to select some date say 21.
I am able to find the resource id of the element 21, but it is same for all the numbers in the calender.
Here 'resource id' is same but 'text' is changing according to numbers. My 'resource id' is in.redbus.android:id/gridCellin.redbus.android:id/gridCell.
click element of that resource id is not clicking 21 because resource id is same for all numbers.
Please help me. I got stuck here.
At last I found the solution for my problem.
I am using robot framework. So, I used xpath=//*[@text=21]
Using xpath works fine almost every time, except if there is any special character in any of the nodes.
I am trying to get solution for that special character case as well. I will post once I find the answer.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With