Timepicker

34 views
Skip to first unread message

Liina Kasvand

unread,
May 2, 2015, 1:00:49 PM5/2/15
to calabash...@googlegroups.com
Hi!
I just started to use Calabash and my app is about choosing time in Timepicker. I see that there is predefined steps Given /^I set the time to "(\d\d:\d\d)" on TimePicker with index "([^\"]*)"$/  and  Given /^I set the "([^\"]*)" time to "(\d\d:\d\d)"$/
But I cannot understand where should I get Index and how should i set this in this step. 


Thank you for the help in advance!

Liina

Jani Jegoroff

unread,
May 2, 2015, 3:07:31 PM5/2/15
to calabash...@googlegroups.com
Have you looked this post: https://groups.google.com/d/msg/calabash-android/Tl14BqQeWoU/FkXoWcORMt0J

Look for set_time method.

Is your TimePicker native Android widget or custom one?

Liina Kasvand

unread,
May 3, 2015, 9:04:29 AM5/3/15
to calabash...@googlegroups.com
Hi!
Yes, I tried this before but it gives me error Lexing error on line 5: 'set_time("TimePicker",16,23)' 
My app is native
Im very new in Calabash that's why it might be wrong question but I have testscript in Gherkin so maybe it doesn't work as this step would be in Ruby?


Liina Kasvand

unread,
May 4, 2015, 10:33:41 AM5/4/15
to calabash...@googlegroups.com
Found the solution: Given I set the time to "11:00" on TimePicker with index 1 do |11:00, 1|

Thanks for the help! 
Reply all
Reply to author
Forward
0 new messages