java - How can sent the date in a datepicker appium (Android API 19, version 1.2.4.1) -
I have a problem setting the date from a date picker in the API, by sending the keys in the field like this Trying to set the date:
list & lt; WebElement & gt; Choose = Driver. Find Elements (By.className ("android.widget.EditText")); Pick.get (0) .sendKeys ("21"); Pick.get (1) .sendKeys ("march"); Pick.get (2) .sendKeys ("1989"); This works fine in previous versions of API, but since I am testing in a separate device, now API is not searching for my elements correctly from the inspector window There is a picture that shows that I am using the correct class to find the fields.
Any ideas? Thanks!
(commented but can not)
Make sure that the problem This is because some information is unavailable, but try to use swipe instead of sendKeys , it is not like a sendKeys field.
Anyway, I can recommend an alternate solution when I need to change the date when testing, then you can use the following ADB commands:
ADB open date- YYYYMMdd.HHmms
It is very fast and reliable, hope it helps.
Comments
Post a Comment