0

I am using appium and python scripts to automate testing for an android app. I have come to a problem when trying efficiently select the date in a date field.

When you click on the field, it opens a small calendar in month view, where you can select the year and then scroll by month, one at a time, and finally select the day. I want to avoid having to scroll through to save time and tried finding a setValue method for android in the appium_python client. When I try to send keys to the element using send_keys in the format that the API requires, the driver clicks on the field (opening the calendar) and tries to send the keys, which does nothing.

Im confused why this isn't working since all the calendar does is return a string anyway.

help?

seanrocky
  • 1
  • 1

1 Answers1

0

I would think sendKeys first tries to click and then type . But since you said clicking opens the calendar picker it doesn't work. May be (not sure) you can try javascript executor to write the value directly to the field. Something like this answer

https://stackoverflow.com/a/26955409/888070

Community
  • 1
  • 1
Shamik
  • 1,591
  • 2
  • 16
  • 36