Select date in UIDatePicker where the is a minimum date set

429 views
Skip to first unread message

Aviad Sachs

unread,
Feb 22, 2017, 11:49:23 AM2/22/17
to KIF iOS Automated Testing Framework

Hi all,
I'm trying to test my UIDatePicker (dateAndTime mode) when the Minimum Day is set for Today.

For example, using Swift:


let dateTime = ["Feb 28""2","30","PM"]

tester().selectDatePickerValue(dateTime)

tester().waitForAnimationsToFinish()


The KIFUITesterActor method SelectDatePickerValue is failing.
After debugging the reason is clear: 

Since the iOS DatePicker has 1000 rows of values, and today is somewhere in the middle, it has few results for "Feb 28" 
where the first result is before today (2016) and therefore it selctes it, then the minimum property shifts it back to Today. and it's like nothing happened.

Any idea how to overcome this?






Anthony Mann

unread,
Feb 23, 2017, 5:08:02 PM2/23/17
to kif-fr...@googlegroups.com
What is the exact failure?

Tony
--
You received this message because you are subscribed to the Google Groups "KIF iOS Automated Testing Framework" group.
To unsubscribe from this group and stop receiving emails from it, send an email to kif-framewor...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Aviad Sachs

unread,
Feb 26, 2017, 12:08:32 PM2/26/17
to KIF iOS Automated Testing Framework
see my suggested solution here:  https://github.com/kif-framework/KIF/pull/949

Aviad Sachs

unread,
Feb 27, 2017, 11:48:00 AM2/27/17
to KIF iOS Automated Testing Framework
There is no failure in code. 
But - the date is not selected. Its stays on the default picker value.

In debugging I saw it selects a past date, and then the controll jumps back to default value - Toady....



On Friday, February 24, 2017 at 12:08:02 AM UTC+2, Tony Mann wrote:
Reply all
Reply to author
Forward
0 new messages