Calabash: Select a date from a UIDatePickerview

后端 未结 2 1866
温柔的废话
温柔的废话 2021-01-26 04:40

In Calabash Automation testing on iPhone. I need to select a date from a date picker. Please guide me with a ruby step definition.

I want something like



        
2条回答
  •  滥情空心
    2021-01-26 05:35

    That gist mentioned by Chathura is very out of date.

    Calabash iOS now supports interaction with most date pickers natively.

    https://github.com/calabash/calabash-ios/blob/develop/calabash-cucumber/features/step_definitions/calabash_steps.rb#L406

    Scenario: I should be able to use the predefined steps to change the picker time
        Then I change the date picker time to "10:45"
    
    Scenario: I should be able to use the predefined steps to change the picker date
        Then I change the date picker date to "July 28 2009"
    
     Scenario: I should be able to use the predefined steps to change the picker date and time
        Then I change the date picker date to "July 28" at "15:23"
    

提交回复
热议问题